2 ms·
My understanding is that arguments caller has been removed, and Function.prototype.caller is non-standard: > The obsolete `arguments.caller` property used to
by braythwayt 11y ago
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.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/caller https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Can you provide an example of modifying a declared variable in a calling environment? I'm very interested!
- riffraff 11y agoI meant this: 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.