/

HTML / CSS / JavaScript Tutorial

JavaScript Array method: pop()

[this page | pdf | back links]

The pop() 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 the relevant object or primitive that was at the relevant place in the original array.

 

array.pop()

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Arrays


Desktop view | Switch to Mobile