![]() |
The toReversed() method in Javascript arrays returns a new array with the elements in reversed order and the original array remains unaffected. The Unlike the Syntax:It will not take any parameter and return the array with elements in reverse order. let result_array = actual_array.toReversed() Example: JavaScript program to reverse the elements in an array
Output: Existing Array: [60, 78, 90, 34, 67] |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |