May 15, 2010

Return statement in javascript

return expression;
//or
return;

If there is no expression, then the return value is undefined. Except for constructor, whose return value is this