Specify scope for eval() in JavaScript?
you can use the “use strict” to contain the eval’ed code within the eval itself. Second, eval of strict mode code does not introduce new variables into the surrounding scope. In normal code eval(“var x;”) introduces a variable x into the surrounding function or the global scope. This means that, in general, in a function … Read more