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