My understanding is that arguments caller has been removed, and Function.prototype.caller is non-standard:
> The obsolete `arguments.caller` property used to provide the
> function that invoked the currently executing function. This
> property has been removed and no longer works.
function sidEffecting(ary) {
ary[0] = ary[2];
}
function bar(a,b,c) {
c = 10
sidEffecting(arguments);
return a + b + c;
}
bar(1,1,1) // I expect 12, but is 21
I now realize this could actually be not allowed anymore in recent ES, I am not sure, but copy & paste in chrome console still prints 21.
I do not think that is true, a called function can side effect the caller environment via `arguments` if that is passed around.