It says I didn't create a function called list?


#1

Below is the code. When I save and submit, it says I didn't create a function called list.

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 6666",
address:['One Apple Way','Appleville','WA','98054']
}
};

var list = function(){
for(var firstName in friends){
console.log(bill);
}
};


#2

@utsav815,

+++ friends list and search and for-in explained.
Look here for an explanation
object
function
for-in-loop
list-function
search-function
http://www.codecademy.com/forum_questions/545275fd8c1ccc8e3e000a23#comment-5457b12c9c4e9d87cb00003f

For an explanation, of more output in your display
please read
= http://discuss.codecademy.com/t/6-8-a-question-of-why-i-get-the-result-i-get/10666/10?u=leonhard_wettengmx_n3


#3

var list = function(friends) {
for (var friends in friends) {
console.log(friends);
}
}
i don't know why but this code is working
:smile: