Javascript Functions Return Value


The return statement can be used to cause the function to return early.  When 
return is executed, the function returns immediately without executing the 
remaining statements.  A function always returns a value.  If the return value 
is not specified, then undefined is returned.  If the function was invoked with 
the new prefix, and the return value is not an object, then this (the new 
object) is returned instead.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License