Introduction
suggest changeeval runs a string as JavaScript. Do not use it on untrusted text. See Evaled JSON injection. In non-strict code, a direct eval of var creates a binding in the calling scope. A strict direct eval keeps those bindings inside the eval. Indirect eval ((0, eval)) runs in global scope.
eval("var a = 'Hello, World!'");
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents