Calling a Function
To call a function later in the script, you just write the name of the function as shown in the following code.
So far, we’ve seen functions with no parameters. But various parameters can be passed when calling a function. These parameters passed into the function can be handled and any action can be performed on these parameters. A function can be separated by multiple commas.
The return Statement
This is important if you want to return value from the service. This statement must be the last statement of a function.