Search
The pop() method removes the last element of an array.
pop()
In the example given above, sports.pop() removes the last element "Basketball" from the array sports.
sports.pop()
sports
The pop() method also returns the element that was removed, as shown in the example below.