#6 Don't know if the result is correct


#1

Hi people. Here is my code, and on the bottom you'll see the result of my code. I don't know if it's ok.


var friends = new Object();

friends.bill = new Object();

friends.bill.firstName = "Bill";
friends.bill.lastName = "Gates";
friends.bill.number = "123 123-12345";
friends.bill.address = ["One Microsoft Way", "Redmond", "WA", "98052"];

friends.steve = new Object();

friends.steve.firstName = "Steve";
friends.steve.lastName = "Jobs";
friends.steve.number = "223 234-23456";
friends.steve.address = ["Other Microsoft Way", "Blackmond", "WA", "98053"];

var list = function(friends)
{
    for (var friend in friends)
    {
        console.log (friend);
    }
}

And here is the result:

bill
steve
["Other Microsoft Way","Blackmond","WA","98053"]


#2

the output is fine, why should it be wrong?

the exercise calls your function (for validation purposes) which results in this output:

bill
steve

and the codecademy console echoes the last value, just console behaviour, everything is fine :slight_smile:


#3

Ok, thank you. Better to ask, just to be sure. I was a bit late. :wink:


#4