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