Shu-yu Guo wrote:
Good catch and thanks for the correction! The take-home from the example is
that: due to the global lexical scope, a TDZ error could arise later due to
newly introduced bindings.
So for that I guess the code would have to look like this?
<script>
var x;
function f() { dump(x); }
f(); // prints undefined
</script>
<script>
f(); // throws TDZ error?
let x = 42;
</script>
--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform