Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Microsoft® JScript® return Statement |
Language Reference Version 1 |
Exits from the current function and returns a value from that function.
return [expression];
The expression argument is the value to be returned from the function. If omitted, the function does not return a value.
You use the return statement to stop execution of a function and return the value of expression. If expression is omitted, or no return statement is executed from within the function, the expression that called the current function is assigned the value undefined.The following example illustrates the use of the return statement:
function myfunction(arg1, arg2) { var r; r = arg1 * arg2; return(r); }
Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |