Return statement

The return statement immediately exits out of a function and if supplied with a value, returns that value to the caller.

Example

The following example defines a function, and uses the return statement to return the sum of those two numbers.