A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.w3schools.com/jsref/jsref_array_toreversed.asp below:

Website Navigation


JavaScript Array toReversed() Method

JavaScript Array toReversed() Example

// Create an Array

const fruits = ["Banana", "Orange", "Apple", "Mango"];

// Reverse the Array

const fruits2 = fruits.toReversed();

Try it Yourself ยป Description

The toReversed() method reverses the order of the elements in an array.

The toReversed() method returns a new array.

The toReversed() method does not overwrites the original array.

The toReversed() method is the copying version of the reverse() method.

Array Sort Methods: Method Finds reverse() Reverses the order of the elements in an array sort() Sorts the elements of an array toReversed() Reverses the elements of an array into a new array toSorted() Sorts the elements of an array into a new array Syntax Parameters Return Value Type Description Array A new array with the items reversed. Browser Support

toReversed() is a JavaScript 2023 feature.

ES 2023 is supported in all modern browsers since July 2023:

Chrome
110 Edge
110 Firefox
115 Safari
16.4 Opera
96 Feb 2023 Feb 2023 Jul 2023 Mar 2023 May 2023

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4