return

return expression

Terminates the function. In the second case the given expression, variable, or constant is returned as result to the calling function, where it can be evaluated.

Parameters:

expression - value to be returned, like a variable, expression or constant.

Example:

var compute_days(var age, var days)
{
  return age * days;
}

See also:

function, expression

► latest version online