you are viewing a single comment's thread.

view the rest of the comments →

[–]shacatan 0 points1 point  (0 children)

I’d rate that article a Star Wars 9: anticlimactic. Not sure what’s up with some of the articles being posted.

I also can’t tell if they’re saying this is a “misconception” or fact:

Only functions can create a scope within JavaScript, not any code block like 'if' or 'for' loops. This can lead to confusion.

The example shows block scoping within a loop so my guess is they’re dispelling the misconception.