Re:Eloquent JavaScript 4th edition (2024)
by skitter on Thursday March 07, 2024 @01:10PM
(#39632418)
> it's a local binding getting bound to different values
on each scope entry.
It is, I just wanted to point out that the term "immutable variable" is sensible. I think a good way to put it is that b is a variable, and when the statement runs a value is bound to b. So the value bound to b varies yet b can be immutable, in contrast to a constant which is a binding to always the same value.
It is, I just wanted to point out that the term "immutable variable" is sensible. I think a good way to put it is that b is a variable, and when the statement runs a value is bound to b. So the value bound to b varies yet b can be immutable, in contrast to a constant which is a binding to always the same value.
> Did you mean `const b = a;` ?
Fixed, thanks :)