Description
The reverse() method reverses the order of the elements in an array (makes the last element first, and the first element last).
This method has the form:
Array.reverse()
Examples
The following example shows the basic use of this method.
<script>
var cols = [ "Red", "Green", "Blue" ];
document.write(cols.reverse());
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|