Why was the arguments.callee.caller property deprecated in JavaScript?
It was added and then deprecated in JavaScript, but it was omitted altogether by
Just an extension. The value of "this" changes during recursion. In the following (modified) example, factorial gets the {foo:true} object.
[1,2,3,4,5].map(function factorial(n) {
console.log(this);
return (!(n>1))? 1 : factorial(n-1)*n;
}, {foo:true} );
factorial called first time gets the object, but this is not true for recursive calls.