My current array: abc = ['a', 'b', 'c', 'd'];
I understand .pop()
remove and returns the last item of an array, thus: abc.pop(); = 'd'
However, I want to remove the last item, and return the array. So it would return:
['a', 'b', 'c'];
Is there a JavaScript function for this?