how to delete from end of an array js code example Example: remove last element from array javascript array.splice(-1,1)