List 'em all!


Hello guys, can someone help figure out what's wrong with my code.
I get an unexpected error each time, and I've also been to the forum but still can't figure it out

var friends = {
    //we've added two empty ojects to our friends object
    bill: {
       firstName: "Bill",
       lastName: "Gates",
       number: "(206) 555-5555",
       address: ['One Microsoft Way', 'Redmond', 'WA', '98052']
    steve: {
       firstName: "Steve",
       lastName: "Jobs",
       number: "(205) 777-7777",
       address: ['Three Apple Drive', 'Ottumwa', 'CA', '89330']
var list = function (friends){
      for(var key in friends){



your list should be after your friends object, currently you nested your function inside you friends object


Thanks for the reply:
And why d I have them names printed twic??


the exercise calls your function for validation purpose, the side effect is that you get more output then expected (goes for the whole contact list track)

if you want to see your code in action, go to jsbin, open javascript and console tab, and press run js code in top right corner


Alright, Thanks again