web-feature: Array by copy
The toReversed()
, toSorted()
, toSpliced()
, and with()
methods of arrays and typed arrays return changed copies of arrays. They stand in contrast to methods such as sort()
or reverse()
that change arrays in place.