CodeIntermediate

Immutable

Also known as immutability · immutable data

Unable to change after creation, or deliberately treated as unchangeable so updates produce new values instead.

In the real world

const next = [...items, 'new']; creates a new array rather than pushing into items.

Related

Go a little deeper