Web features explorer

Array by copy

Newly available since 2023-07-04
Tags: javascript Groups: JavaScript > Collections > Arrays JavaScript > Collections > Typed arrays

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.

Learning resources on MDN

Browser support