Main Index : Reference :
return;
return [any type] value;
value
is an optional return value of any type.
return
jumps from within a called function back to the code that called it and also passes value
along as a return value if specified. A function can contain several return
statements.
// Outputs "1 + 3 = 4".
add(x,y)
{
return x+y;
}
var a = 1;
var b = 3;
var res = add(a,b);
println(a," + ",b," = ",res);