Function Declarations
Function Declaration
π¨βπΌ We need a tiny helper that returns a message to show in the UI. Let's start
with the simplest possible function.
A function declaration looks like this:
function getFavoriteNumber(): number {
return 28
}
π¨ Open
and create
getMessage that returns the
string "Hello, functions!", with an explicit return type.π° Remember to return a string and annotate the return type.


