how to add objects in array

JavaScript
var a=[], b={};
a.push(b);    
// a[0] === b;var object = "Some Object"
var array = []

array.push(object)var a=[]
var b={};
a.push(b);    
Source

Also in JavaScript: