Did the JS spec seriously special-case variable scoping in `for(;;)` loops, just because of the common loop closure bug? Because its behavior now is way less intuitive, IMO. I had no idea that this:

```
for(let i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1000)
}
```

Would log out 0 1 2. If you understand the rules around closure scope this seems way more bizarre than the 3 3 3 behavior that `var i` will give you.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://social.treehouse.systems/users/jnkrtech/statuses/116183827224808150 on your instance and quote it. (Note that quoting is not supported in Mastodon.)