jquery array modify last element code example
Example: take off element form end of array
const colors = ["Blue", "Green", "Red", "Yellow"];
colors.pop();
console.log(colors); // ["Blue", "Green", "Red"]
const colors = ["Blue", "Green", "Red", "Yellow"];
colors.pop();
console.log(colors); // ["Blue", "Green", "Red"]