Specifies the value to be returned by a function.
Syntax
return expression
Parameters
Parameter | Description |
---|---|
expression | The expression to return. |
Examples
The following function returns the square of its argument, x, where x is a number.
Specifies the value to be returned by a function.
return expression
Parameter | Description |
---|---|
expression | The expression to return. |
The following function returns the square of its argument, x, where x is a number.