Can I limit the access of a string-generated function (using the Function constructor) to the parent/global scopes?
For example: the following code, as it is, prints false, because the function is storing/modifying the variable a in window.
window.a = 4;
Function("a=3;")()
console.log(a === 4);
Could I restrict the access to window/parent scope and make it print out "true"?