May 2011
Intermediate to advanced
1093 pages
40h 54m
English
Arguments.callee — the function that is currently running
not defined in strict mode
arguments.callee
arguments.callee refers to
the function that is currently running. It provides a way for an
unnamed function to refer to itself. This property is defined only
within a function body.
// An unnamed function literal uses the callee property to refer// to itself so that it can be recursivevarfactorial=function(x){if(x<2)return1;elsereturnx*arguments.callee(x-1);}vary=factorial(5);// Returns 120