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