Functions can return values.
In the function declaration, the return type appears after the parameter list, separated from the parameter list itself via a colon.
Then, you can use the return
keyword in the function body to indicate the
value to be returned by that function.
You can learn more about this in:
Tags: