pop (JavaScript)
Removes the last element of an array.
Defined in
Array (Standard - JavaScript)Syntax
pop() : java.lang.Object
Return value | Description |
---|---|
java.lang.Object |
The removed element. |
Examples
This computed label removes and displays the last element of an array.var a = new Array("one", "two", "three");
a.pop() // three