Four newer JavaScript array methods that return copies instead of mutating the original array: `toSorted()`, `toReversed()`, `toSpliced()`, and `with()`. These are the non-mutating counterparts to `sort()`, `reverse()`, `splice()`, and bracket assignment respectively. All four are now Baseline newly available, meaning they're
Table of contents
Sort an array and return a copy with Array.toSorted()Reverse an array and return a copy with Array.toReversed()Remove or replace elements in an array and return a copy with Array.toSpliced()Create a new array with Array.with()Sort: