Reading List

New array methods in JavaScript bring immutability from Christian Heilmann RSS feed.

New array methods in JavaScript bring immutability

JavaScript now has a way to change elements, sort, reverse and splice arrays without changing the original, thus giving it immutability. Four new methods allow you to change arrays without having to create a copy first. The new methods are `with()`, `toSorted()`, `toReversed()` and `toSpliced()`. No need to create a copy with `[...arr]` first. Only […]