6: List 'em all



Can anyone figure out where I'm going wrong on this subject 'List 'em all'-

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555",
address: ['One Microsoft Way','Redmond','WA','98052']
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "(206) 555-5556",
address: ['One Apple Way','Redmond','WA','98052']
eric: {
firstName: "Eric",
lastName: "Overall",
number: "(206) 555-5557",
address: ['One Prima Way','Redmond','WA','98052']
ben: {
firstName: "Ben",
lastName: "Harris",
number: "(206) 555-5558",
address: ['One Butcher Way','Redmond','WA','98052']
var list = function (friends) {
for (var key in friends) {

Any help would be greatly appreciated!



Could I see a link to the exercise?


HI you have more } than you need at the end just remove one.


this has done the trick, thank you


I would just add that this exercise is asking to print the names steve and bill, the way you set it up it prints the addresses too. So you want to call the function outside the brackets so that it only prints steve and bill


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