javascript how to create an object with array and push code example
Example 1: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
Example 2: how to add object to array javascript
var object = "Some Object"
var array = []
array.push(object)