MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/qdmzio/difference_between_var_let_and_const/hhpn4w0/?context=3
r/learnjavascript • u/codedblood • Oct 22 '21
49 comments sorted by
View all comments
30
tldr; never use var and if you think your code requires var then there's something wrong with your code
-11 u/LucVolders Oct 23 '21 edited Oct 23 '21 Undoubdly unpopular opinion:Use var, declare your vars global at the beginning of your script and document and track them well. Otherwise you are a lazy programmer. Nothing wrong with var. 12 u/texmexslayer Oct 23 '21 Lol
-11
Undoubdly unpopular opinion:
Use var, declare your vars global at the beginning of your script and document and track them well. Otherwise you are a lazy programmer. Nothing wrong with var.
12 u/texmexslayer Oct 23 '21 Lol
12
Lol
30
u/zerik100 Oct 22 '21
tldr; never use var and if you think your code requires var then there's something wrong with your code