Re:JavaScript variables: var and let and const
by allenskd on Friday March 06, 2020 @05:58PM
(#22508159)
I believe so. I don't make a big issue out of it... but anything carrying the word const I expect it to be fully read-only with no "buts" in between throughout the whole execution of the program. I guess if they used "readonly" as C# it would make more sense?
If the value is a primitive, you can't change it. If the value's a reference you also can't change that, but of course you can modify whatever that points to.
Is that what's bugging people about this?