remove last item array javascript new array code example Example: splice last element from array javascript array.splice(-1,1)