Can use pop method.
var arr = [1,2,3,4];
console.log(arr[arr.length -1]); // get the last element
arr.pop(); // delete the last element
(or)
//other way for deleting the last element
console.log(arr.splice(arr.length-1, 1));
console.log(arr); // [1,2,3]