1array.pop(); //returns popped element
2//example
3var fruits = ["Banana", "Orange", "Apple", "Mango"];
4fruits.pop(); // fruits= ["Banana", "Orange", "Apple"];
1// example (remove the last element in the array)
2let yourArray = ["aaa", "bbb", "ccc", "ddd"];
3yourArray.pop(); // yourArray = ["aaa", "bbb", "ccc"]
4
5// syntax:
6// <array-name>.pop();
1array.pop(); //returns popped element
2//example
3var fruits = ["Banana", "Orange", "Apple", "Mango"];
4fruits.pop();