Starting with ECMAScript 3, you can have named function expressions. Prior to that function expressions were anonymous, which made arguments.callee necessary. Named function expressions made it unnecessary. So that's the recommended alternative.
See the MDN docs for callee
Example:
[1,2,3,4,5].map(function factorial (n) {
return !(n > 1) ? 1 : factorial(n-1)*n;
});
The benefits of named functions (from the MDN docs):
- the function can be called like any other from inside your code
- it does not pollute the namespace
- the value of this does not change
- it's more performant (accessing the arguments object is expensive)