/

HTML / CSS / JavaScript Tutorial

JavaScript Array method: reverse()

[this page | pdf | back links]

The reverse() method (when applied to a JavaScript array) removes the last element of the array and returns that element.

 

It has the following syntax with no parameters. It returns an array as above.

 

array.reverse()

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Arrays


Desktop view | Switch to Mobile