Is ES5 Strict a fully statically scoped language?

Gavin Barraclough barraclough at apple.com
Wed Oct 3 12:56:44 PDT 2012


On Oct 3, 2012, at 12:40 PM, François REMY wrote:

> Indirect eval is something introduced for ES5 Strict only, I believe.

Nope.  See 15.1.2.1.1, no reference to strict.

Here's a better example:
	(function(t){ var x = 'foo'; t("x = 'bar'"); alert(x); })(eval)
The indirect eval does not modify the function's local variable.

cheers,
G.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121003/033f81c4/attachment-0001.html>


More information about the es-discuss mailing list