push to array javasc code example
Example 1: javascript append to array
var colors=["red","white"];
colors.push("blue");//append 'blue' to colors
Example 2: js push array
array.push(element_to_push);
var colors=["red","white"];
colors.push("blue");//append 'blue' to colors
array.push(element_to_push);