DEV Community

[Comment from a deleted post]
Collapse
 
aerodarius profile image
Dario Cruz • Edited

Absolutely, they must be inmutable. For those cases, you can change the value of a variable but not change the variable itself.

Got this from MDN documentation:

Mutable is a type of variable that can be changed. In JavaScript, only objects and arrays are mutable, not primitive values.