Ran into this basic JavaScript scope gotcha today.
Just goes to show, you could be programming in a language for years and still get tripped up by some of the simplest issues.
https://codeberg.org/aral/gists/src/branch/main/javascriptScope.md
@aral I'm sure you're sick of people popping in to explain this at you, so I won't do that.
But I *will* say this has the coolest name of anything I know of in programming: it's the TEMPORAL DEAD ZONE!
A touch of Star Trek in our JavaScript!
@drhayes Ooh, I like that :)