function foo() { eval("var a = arguments"); } foo(); Run the forementioned code and you get an exception: Uncaught exception - ReferenceError: 'arguments' is not defined However, if I modify the function foo like this: function foo() { arguments; eval("var a = arguments"); } then the code runs just fine. This means that the arguments -object (which should be accessible for every function), is not accessible from within eval()'ed code unless it is referenced before the eval(). This is very confusing behaviour, which can lead to really arcane bugs. Unless this behaviour is required for ES5 conformance I suggest to make arguments available inside eval() without prior referencing as one would expect.
commit 3d3f473c399186d229bc0313d3f4efaef0cc5bdb Author: Tor Andersson <tor.andersson@artifex.com> Date: Mon Nov 11 11:02:54 2019 +0100 Bug 701887: Create arguments if eval is present. We can't know at compile time that the 'arguments' object will not be used from the eval statement, so err on the side of caution and always create the arguments object if eval can be called.