how to add a variable into a array in js code example Example: js add element to array var fruits = [ "Orange", "Apple", "Mango"]; fruits.push("Banana");