JavaScript Array pop() method
removes the last element from an array and returns that removed element

pop() method removes the last element from an array.

pop() method returns the removed element.

pop() method does not accept any parameter.

pop() method changes the original array.

pop() method decreases the length of the array.

pop() will return undefined if array is empty.

syntax description
remove the last element from myArray and return the removed element
myArray.pop()