Hello ecmascriptians,

I hear that TC39 wants to allow let and const into "classic mode".  This
sounds like a bad idea to me, but, ok.

If so, can someone say what these expressions would evaluate to, or the
errors they would raise:

  (function (){eval("let x = 10"); return x;})()

  (function (){var x = 20; eval("let x = 10"); return x;})()

  (function (){let x = 20; eval("let x = 10"); return x;})()

  (function (){let x = 20; { eval("let x = 10"); return x;}})()

  (function (){let x = 20; eval("var x = 10"); return x;})()

  (function (){ { let x = 20; { eval("let x = 10"); return x;}}})()

As Leibniz would have it, let us calculate.

Andy
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to