News for hackers. Stuff that matters.
Re:JavaScript fundamentals before learning React by duncan-donuts on Thursday July 19, 2018 @08:39PM (#17571573)
I agree with you, but I’ve cleared up this confusion with a number of colleagues. People coming from languages that have a truly immutable “const” find the keyword confusing in js.
Re:JavaScript fundamentals before learning React by jaredklewis on Thursday July 19, 2018 @09:52PM (#17571867)
Yea, I think const in JS alludes to the way const works in C++.

If someone knows java though, it can always be explained that const in JS is identical to marking a local variable as final in Java.

More so than const, I was perplexed by the JS choice of the `let` keyword. Are there any other languages that use let for declarations that can be reassigned? Did BASIC allow lets to be reassigned? Can’t remember...

Re:JavaScript fundamentals before learning React by andreareina on Friday July 20, 2018 @01:13PM (#17576898)
`let` in common lisp can be reassigned.