My result is not what I expected


var friends = new Object();

friends.steve = {
firstName: "Steve",
lastName: "Jamie",
number: "233-5433-122",
address: ['One Microsoft Way','Redmond','WA','98052']};

friends.bill = {
firstName: "Bill",
lastName: "McCarthy",
number: "231-2233-121",
address: ['233 Kensington Road','Liverpool','UK','12052']

var list = function (object) {
for (var key in object) {


This code outputs steve, bill, steve, bill.
Shouldn't it just output steve, bill?


Your ran "friends" thus everybody was printed


Yes, but why twice? I got steve,bill,steve,bill instead of just steve,bill



In some sections of this course, the course-checker Display's data
this you could then identify by placing two EXTRA code-line's:
console.log( "== My End ==" );
console.log( "== All that is displayed now, is the course-checker ==" );


Thanks for your reply. I believe this must be it, the course-checker. Later on lesson "Building an Address Book", part "Displaying People" I noticed they mentioned, "Don't worry if your output appears twice - we're just double checking your code!"