JavaScript » Statements » return

Syntax:
return

The return statement specifies the value to be returned by a function and performs the act of returning that value to where the function was called from.

Examples

Code:
function average(a, b, c)
{
   return (a + b + c)/3;
}
Explanation:

This example returns the average of three numbers entered as arguments.