delete last value of js array code example
Example 1: javascript remove last element from array
var colors = ["red","blue","green"];
colors.pop();
Example 2: how to remove the last element of an array in javascript
let cars = ['BMW', 'Benz', 'Audi'];
cars.pop(); // ['BMW', 'Benz']