DEV Community

Discussion on: Differences between "var" and "let" keywords?

Collapse
 
edisonpappi profile image
Edison Augusthy

and 2 more thing

  • const variables must be assigned a value when they are declared
  • const variables does NOT define a constant value. It defines a constant reference to a value. ie, can change the properties of a constant object
Collapse
 
nunocpnp profile image
Nuno Pereira

In the article I'm only talking about the differences in "var" and "let" not in const !

Collapse
 
jamesthomson profile image
James Thomson

const variables does NOT define a constant value.

Unless the value is a primitive ;) You are correct if it's an Object (as stated in your example), just think that should be clarified.