by honie · 5y ago · 0 comments
The following doesn't seem to be valid though. :( Am I missing something?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label
let a = 1;The rationale here is that the variable goes out of scope right away due to the implicit block, so they made it a syntax error so that you don't waste time pulling your hair out debugging issues downstream from this line without realizing this scope-related obscurity. (This also has potential security implications e.g. if you think you're shadowing a variable from a parent scope but you're not)
>> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
10
<- 10
```
Eg, this is equivalent to:
```
>> https: 10
```