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