supprimer le dernier élément du tableau javascript
array.splice(-1,1)
Innocent Iguana
array.splice(-1,1)
array.pop(); //returns popped element
//example
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.pop(); // fruits= ["Banana", "Orange", "Apple"];
array.splice(-1,1)
var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits);
document.write("<br>");
fruits.pop();
document.write(fruits)
arr.slice(0, -1); // returns [1,0]
array.pop(); //returns popped element
//example
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.pop();