vars have scope over the closure they are in so you only get scope when the curlies indicate a function. if you want lexical scope see if you can have const or let.
-
-
-
it should be said that nobody probably used `var` in a few years
- Show replies
New conversation -
-
-
JavaScript is an abomination. It's so flexible all code written in it ends up shitty! It's a feature!
-
“PHP is too dangerous for newbie programmers. Let’s all switch to JavaScript!”
End of conversation
New conversation -
-
- Show replies
New conversation -
-
This Tweet is unavailable.
-
so I learned 60 seconds ago
End of conversation
-
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Same as python and Ruby. Hence my fondness for perl's my and ES6 let.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.