The reverse() method reverses the order of the elements in an array.
The reverse() method reverses the order of the elements in an array.
array.reverse()
None
An Array, representing the array after it has been reversed
Reverse the order of the elements in an array:
var myArray = ["XML", "Json", "Database", "Mango"]; console.log( myArray );/*from w w w . jav a 2 s .co m*/ myArray.reverse(); console.log( myArray);