3 ms·
I'm almost embarrassed to say it took me way to long to realize JavaScript wasn't block scoped.
by BinaryIdiot 11y ago
I'm almost embarrassed to say it took me way to long to realize JavaScript wasn't block scoped.
- taco_emoji 11y agoSame here! It's probably the norm, honestly. Javascript never should've had C-like syntax if it was to have the feature set it does. Its syntax descends from a tradition of languages that have none of its actual features. Most other C-like languages have block scope[0]. So the syntax PLUS the terrible, awful, no-good very bad name lead you to believe it's more-or-less dynamic Java, when nothing could be further from the truth. [0] ...and require declaration before usage, and have sensible 'this' semantics, and are class-based, and have function parameters that are more than just syntactic sugar, and have ACTUAL arrays, and...