return Statement

Top  Previous  Next

Re5turns a value and ends the processing of the current function.


return [expression]


If expression is specified, it is converted to the type of the function in which the statement appears. If expression conversion is not possible, the return statement is invalid.

If no expression is specified, the return statement is similar to a break statement.


function f(a,b)


return a*b;


Net.write(f(4,3));// Returns 12