MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/btxz72/what_are_some_javascript_things_beginners_dont/ep8mg6t/?context=3
r/javascript • u/[deleted] • May 28 '19
383 comments sorted by
View all comments
2
Variables declared with "var" are scoped to their encapsulating function (or global if not encapsulated). You should be using the "let" keyword for most, if not all, declarations.
2
u/Caffeine_Monster May 29 '19
Variables declared with "var" are scoped to their encapsulating function (or global if not encapsulated). You should be using the "let" keyword for most, if not all, declarations.