// Create an Array
const fruits = ["Banana", "Orange", "Apple", "Mango"];
// Reverse the Array
const fruits2 = fruits.toReversed();
Try it Yourself ยป DescriptionThe 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.
toReversed()
is a JavaScript 2023 feature.
ES 2023 is supported in all modern browsers since July 2023:
ChromeTrack 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