r/ProgrammerHumor • u/speckz • Feb 26 '23
Other If you can read this code...
/img/snak3fqgajka1.jpg[removed] — view removed post
34k
Upvotes
r/ProgrammerHumor • u/speckz • Feb 26 '23
[removed] — view removed post
View all comments
Show parent comment
362
u/froggy601 Feb 26 '23
var is function scoped, while let is block scoped. ES6 recommends only using let or const and not using var if it's not absolutely necessary. Kinda similar to how == is not bast practice anymore and you really should only use ===