Favorites

JavaScript Array.prototype.toReversed() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Array.prototype.toReversed()
JavaScript Array Instance methodThis method is supported by all modern browsers.
Updated 28th November 2026

The toReversed() method returns a reversed copy of an array, leaving the original unchanged.

Description

The toReversed() method is the copying version of reverse(): it returns a new array in reverse order and leaves the original alone. Empty slots become undefined.

It was added in 2023 together with toSorted(), toSpliced() and with(), a group known as "change array by copy" methods. Before these, the usual way was [...arr].reverse() or arr.slice().reverse(), which work the same way but read less clearly.

The copy is shallow: if the array contains objects, the new array holds references to the same objects. Typed arrays have their own toReversed() method. Use it in code where data shouldn't be mutated, such as state in React or other UI frameworks, so components notice the change.

Syntax

array.toReversed()

Return Value

A new array with the elements in reverse order.

Example

const steps = [1, 2, 3];
console.log(steps.toReversed());
console.log(steps);

Browser Support

The following information will show you the current browser support for the Array.prototype.toReversed() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee