You can also .pop off the last element. THIS WILL CHANGE THE VALUE OF THE ARRAY. ButBe careful, this will change the value of the array, but that might be OK for you.
var a = [1,2,3]; a.pop(); // 3 a // [1,2]
You can also .pop off the last element. THIS WILL CHANGE THE VALUE OF THE ARRAY. But that might be OK.
var a = [1,2,3]; a.pop(); // 3 a // [1,2]
You can also .pop off the last element. Be careful, this will change the value of the array, but that might be OK for you.