array push javascript object code example Example: Add object to array javascript var object = "Some Object" var array = [] array.push(object)