how to append an element to an array code example
Example 1: javascript append to array
var colors=["red","white"];
colors.push("blue");//append 'blue' to colors
Example 2: javscript append item from array
let foo = ['oop','plop','copo'];
foo.push("plop");