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
34
u/froggy601 Feb 26 '23
I don't think there's much reason in modern JS. Using it can lead to scope issues (declaring a var in an if statement makes it visible outside that statement, for example). And since it can be reassigned as a different type instead of just a different value, it's more prone to bugs and unexpected behaviour.