Removes the last element from an array and returns that element. This method changes the length of the array.
Method of Array
Syntax
pop()
Parameters
None.
Example
The following code creates the myFish array containing four elements, then removes its last element.