Searching for a friend: code debug help


I need help debugging this:

var friends = {
    bill: {
    firstName:"Bill" ,
    lastName:"Gates" ,
    number:"(206) 555-5555",
    address: ['One Microsoft Way','Redmond','WA','98052']
    } ,
    steve: {
    firstName:"Steve" ,
    lastName:"Bertin" ,
    number:"(206) 777-7777",
    address: ['Two Intel Road','Salt Lake','UT','84056']
var friends =function (list) {
    for (var key in object){


i think it might be the comma right here. I'm not totally sure though. try deleting it and see if it works


if that doesn't work can you send me a link?


Yeah. I definitely will.


The problem is it says I didn't create a function called list.


yes,because there is no function in your code named list

your function name is friends should be list.

and here

for (var key in object){

write the name of the variable where you store an object in the place of object


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