On 30/01/2014, at 17:13, Brendan Eich wrote:
/
/>/ />/ Interesting! />/ />/ You don't want the alert to show undefined, so the extent of the inner binding in your model is the unbraced consequent of the "if". />/ />/ That is not "block scope" in any plain sense.
/

How about this?

let x= 0;
if (1) eval("let x= 42; alert(x);"); //Is this in its own block?
alert(x);

`eval()` hasn't yet been updated to work with the new lexical declaration forms, but I hope the example from above will be evaluated in a new block. See https://bugs.ecmascript.org/show_bug.cgi?id=1788 for a related bug report.

- André
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to