how to add object to list in javascript

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

Also in JavaScript: