0
JavaScript
What is the pop()method in JavaScript?
2 Answers
+ 7
The pop() method removes the last element of an array, and returns that element.
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.pop();
output
Banana,Orange,Apple
+ 2
pop() removes the last element of an array and returns it.