how to remove last item from array index in js code example Example: javascript remove last element from array var colors = ["red","blue","green"]; colors.pop();