6.list them all



var friends = new Object();
friends.bill = new Object();
friends.steve = new Object();
friends.bill.firstName = "Bill";
friends.bill.lastName = "Gates";
friends.steve.firstName = "Steve";
friends.steve.lastName = "Job";
friends.bill.number = 982;
friends.steve.number = 894;
friends.bill.address = [34,"gulmohar","thane"];
friends.steve.address = [45,"vasant vihar","thane"];

var list = function(friends){
for(var friend in friends){

i get this message

Oops, try again. It looks like your list function isn't printing the right output.


@leonhard.wettengmx.n your "about objects" talk is needed. thanks


Hi.you should print steve and bill.therefore you should change the key to firstName.
for(var firstName in friends)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.