Immutability
Immutability — Immutability means data that cannot be changed after creation. Instead of modifying data, you create new copies with the desired changes. Immutability is a core principle of functional programming and is essential for predictable state management (Redux, React state). In JavaScript, primitives are immutable by nature, but objects and arrays are mutable. You need to consciously use immutable patterns: spread operator, `map()`/`filter()`/`reduce()` instead of direct mutation, and libraries like Immer for complex state. This term relates to the Object category of the reference. You will meet immutability in practice when working with APIs such as Object.keys(), Object.values(), Object.entries(), Object.assign(). Related terms: Closure, Hoisting, Event Loop, Prototype Chain, Temporal Dead Zone (TDZ), IIFE (Immediately Invoked Function Expression). Understanding immutability makes the rest of the JavaScript documentation noticeably easier to follow, because the concept recurs across methods, guides, and error messages.