The JavaScript array pop() method removes the last element from the given array and return that element. This method changes the length of the original array.
Javascript array pop() method removes the last element from an array and returns that element.
array.pop()
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.pop();