Contact list List em all


Code is passing, but I would like it if someone could explain why it's passing. I'm a bit confused with the for in loop.I was trying to get the console to print out everything, and then once I had that create some if else statements to narrow a search.

var friends = {};

friends.steve = {
    firstName : "Steve",
    lastName : "Jobs",
    number : 123 - 4567,
    address : ["Apple st"],
friends.bill = {
    firstName : "Bill",
    lastName : "Gates",
    number : 321 -7654,
    address : ["One Microsoft Way"],

function list(friends) {
    for(var entries in friends){


For the sake of getting through the lesson with a pass, follow the instructions and do not try to improve upon the code. Be sure it does what is asked, and how it is expected. Once you pass, then you can discuss improvisation, variations and improvements in a Corner Bar discussion. Please do not discuss it in the Q&A.

This is a string, not a number. Be sure to write it in quotes. Same applies to the other one.


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