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