Shu-yu Guo wrote:
4. The global lexical scope is extensible. This means dynamic scope (lol!):
<script>
function f() { dump(x); }
f(); // prints undefined
</script>
<script>
let x = 42;
f(); // prints 42
</script>
Would you mind clarifying what this is supposed to demonstrate? It looks
to me that this is demonstrating TDZ semantics, and under ES6 the first
call to f() will throw.
--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform