o remove the last item from an array use the code example Example: remove last element from array javascript array.splice(-1,1)