Сплайс последний элемент из массива JavaScript
array.splice(-1,1)
Innocent Iguana
array.splice(-1,1)
arr.splice(-1,1)
// OR
arr.splice(arr.length-1,1)
// OR
arr.pop()
var colors = ["red","blue","green"];
colors.pop();
array.pop(); //returns popped element
//example
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.pop(); // fruits= ["Banana", "Orange", "Apple"];
array.pop();
array.splice(-1,1)