Hi Sam :)
On Tue, 2012-01-31 at 11:27 -0500, Sam Tobin-Hochstadt wrote:
> > (function (){eval("let x = 10"); return x;})()
>
> ReferenceError
Oh good. I was thinking that the intention was that let could introduce
new block-scoped bindings in the containing scope. If that is not the
case, then good.
Summary: eval introduces a new block scope.
> > (function (){let x = 20; eval("var x = 10"); return x;})()
>
> 10
Surely a SyntaxError, as the var x conflicts with the let x at the
function-level scope?
Andy
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss