delete last in array javascript code example
Example 1: javascript remove last element from array
var colors = ["red","blue","green"];
colors.pop();
Example 2: javascript array remove last
// example (remove the last element in the array)
let yourArray = ["aaa", "bbb", "ccc", "ddd"];
yourArray.pop(); // yourArray = ["aaa", "bbb", "ccc"]
// syntax:
// <array-name>.pop();