MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/gd8x2z/var_vs_let_vs_const/fpgqra3/?context=3
r/learnjavascript • u/golovatuy • May 04 '20
81 comments sorted by
View all comments
81
const and let can be used in the global scope just as much as var can.
-3 u/Macaframa May 04 '20 This should saylet, const: block scopingconst: non-writable once it’s instantiatedlet: only real use is in a for loop -7 u/MrSandyClams May 04 '20 I use let 100% of the time. Reasoning: the word "const" is ugly to look at 7 u/Macaframa May 04 '20 It’s all words at the end of the day. If it gets the shitty software to the shitty client, it’s going to be declared shitty one day by another shitty developer and be rewritten by some more shitty code.sincerely a disgruntled developer
-3
This should say
let, const: block scoping
const: non-writable once it’s instantiated
let: only real use is in a for loop
-7 u/MrSandyClams May 04 '20 I use let 100% of the time. Reasoning: the word "const" is ugly to look at 7 u/Macaframa May 04 '20 It’s all words at the end of the day. If it gets the shitty software to the shitty client, it’s going to be declared shitty one day by another shitty developer and be rewritten by some more shitty code.sincerely a disgruntled developer
-7
I use let 100% of the time. Reasoning: the word "const" is ugly to look at
7 u/Macaframa May 04 '20 It’s all words at the end of the day. If it gets the shitty software to the shitty client, it’s going to be declared shitty one day by another shitty developer and be rewritten by some more shitty code.sincerely a disgruntled developer
7
It’s all words at the end of the day. If it gets the shitty software to the shitty client, it’s going to be declared shitty one day by another shitty developer and be rewritten by some more shitty code.
sincerely a disgruntled developer
81
u/senocular May 04 '20
const and let can be used in the global scope just as much as var can.