DEV Community

Discussion on: String Manipulation in JavaScript

Collapse
 
peerreynders profile image
peerreynders

MDN: Primitive

All primitives are immutable, i.e., they cannot be altered. It is important not to confuse a primitive itself with a variable assigned a primitive value. The variable may be reassigned a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered.