Let and const, both block scoped, but let can be updated into the scope while const cannot, though neither can be re-declared into it. Objects assigned to a variable using const are still mutable, for example values in an array. Where my confusion lies is the concept of updating vs re-declaring a variable with these two, and how would it look in code. I'd appreciate any further explanation.
Asked
Active
Viewed 140 times
0
-
1Re-declare: `let foo = 'abc'; let foo = 'def';` Reassign: `let foo = 'abc'; foo = 'def';` – CertainPerformance Aug 02 '22 at 05:05
-
thanks, that was all i was looking for, the syntax. – SamberJac Aug 02 '22 at 05:09