Array pop() Method
The Array pop()
method removes the last element of an array. The syntax for this method is
array.pop();
We consider an array named os
consisting of four elements
var os = ["Debian", "Fedora", "openSUSE", "Ubuntu"];
Applying the pop()
method on it will remove its last element Ubuntu
os.pop();
and the modified array with one element less becomes
["Debian", "Fedora", "openSUSE"];