push new element to array javacript code example Example: javascript append element to array var colors= ["red","blue"]; colors.push("yellow");