Is ES5 Strict a fully statically scoped language?

François REMY fremycompany_pub at yahoo.fr
Wed Oct 3 12:58:24 PDT 2012


|  That just puts 'body' on the window.

Indee, I'm false on that one. But if you use a direct eval, you can get the 
same behavior in ES5, which is want I wanted to demonstrate:

    window.a = true;
    (function x(t) { eval(t); return a==window.a; })("var a=false")

So in plain ES5, the scope of an identifer is not always defined lexically. 



More information about the es-discuss mailing list