Comment by n2d4
1 day ago
I mentioned that the title makes no sense in the sentence right after it:
> Yes, the title makes no sense, but you'll see what I mean in just a second.
And yes, I didn't explain the exact mechanics of the ES spec which make it happen — but I would argue that "variables can be modified until they're out-of-scope" is even more unintuitive than just remembering this edge case. And I'm not trying to be an ECMAScript lawyer with the post, rather I'd just show a bunch of "probably unexpected" behaviors of JavaScript.
No comments yet
Contribute on Hacker News ↗