function that push an object to the array in javascript code example Example: javascript array push object var myArray = []; myArray.push("Example"); myArray.push("text");