How to reverse a Javascript array
Description
reverse()
method reverses the order of items in an array.
Example
var values = [1, 2, 3, 4, 5];
values.reverse();
console.log(values); //5,4,3,2,1
reverse()
returns a reference to the resulting array.
The code above generates the following result.