I would consider .pop()
to be the most 'correct' solution, however, sometimes it might not work since you need to use array without the last element right there...
In such a case you might want to use the following, it will return [1,2,3]
var arr = [1,2,3,4];_x000D_
console.log(arr.splice(0,arr.length-1));
_x000D_
while .pop()
would return 4
:
var arr = [1,2,3,4];_x000D_
console.log(arr.pop());
_x000D_
which might not be desirable...
Hope this saves you some time.