how to add an element to list js code example
Example 1: js add element to array
var fruits = [ "Orange", "Apple", "Mango"];
fruits.push("Banana");
Example 2: javscript append item from array
let foo = ['oop','plop','copo'];
foo.push("plop");
var fruits = [ "Orange", "Apple", "Mango"];
fruits.push("Banana");
let foo = ['oop','plop','copo'];
foo.push("plop");