February 2018
Intermediate to advanced
298 pages
8h 22m
English
The difference between const and let is that const makes sure that rebinding will not happen. That means you cannot reinitialize a const variable, but a let variable can be reinitialized (but not redeclared).
Within a particular scope, a const variable always refers to the same object. Because let can change its value at runtime, there is no guarantee that a let variable always refers to the same value. Therefore, as a rule of thumb, you can (not strictly) follow these:
Read now
Unlock full access