how to append a value to list in javascript code example Example: javascript append element to array var colors= ["red","blue"]; colors.push("yellow");