In what ways does the following "eval" regularity break?

Brendan Eich brendan at
Thu Oct 30 14:28:29 PDT 2008

On Oct 30, 2008, at 1:32 PM, Maciej Stachowiak wrote:

> Sure, what I am wondering is whether the var declaration you had  
> above is expected to be a local or global binding (or if the script  
> doesn't care).

As far as I can tell (Prototype folks on this list, please help here),  
this is all synthetic test-fodder. The test scripts do not want a  
local var binding. On the other hand, anyone evaluating

   (function xxx(){ ["var x"].forEach(eval); })();

would get a global var x, which should be the specified outcome, but  
which is probably a mistake on the programmer's part outside of test  


More information about the Es-discuss mailing list