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