For instance if I construct a new object type and create a few objects
function website(name,users)
{
this.name = name;
this.users = users;
}
var goog = new website("goog", "3,000,000");
var fireFox = new website("fireFox", "1,000,000");
var ie = new website("ie", "10");
And I push them into an array
var websites = [];
websites.push(goog,fireFox,ie);
Is there a way I can access a property of each object in the array through a loop? For instance
for (var i=0;var<websites.length;i++)
{
console.log(websites[0.name]);
}
I know this code doesn't work but I hope it clarifies what I'm trying to ask. Thanks!