1array.pop(); //returns popped element
2//example
3var fruits = ["Banana", "Orange", "Apple", "Mango"];
4fruits.pop(); // fruits= ["Banana", "Orange", "Apple"];
1const colors = ["Blue", "Green", "Red", "Yellow"];
2colors.pop();
3
4console.log(colors); // ["Blue", "Green", "Red"]