Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 6: Functions in JavaScript!

Instruction

Return

The purpose of a function is to provide a solution to a dedicated problem. This solution is given back to the calling program by the return statement.

Its syntax is return <expression>, where <expression> is optional.

A function runs until it reaches such a return statement (or an uncatched exception occurs, or behind the last statement). The <expression> may be a simple variable of...