Var list :How do I do the for loop?


#1

How do I create the for loop in the list function? What's wrong with my code?
var friends = {
bill: {
firstName: 'Bill',
lastName: 'Gates',
number: '301-911-6969',
address: ['10000 Rich Guy Lane', 'Richmond', 'VA', '06969',]
},
steve: {
firstName: 'Steve',
lastName: 'Jobs',
number: '301-911-6969',
address: ['10000 Overpriced Stuff Boulevard', 'Silicon Valley', 'CA', '06969',]
},
};

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


#2

Look these lines between 32 to 36, may be you are wrong, you'll find the right way.(Pardon me, my English is just so so).
This is my code, you could test it.
32. var list = function(friends) {
33. for (i in friends) {
34. console.log(i);
35. };
36. };


#3

Some English syntax errors may be in my reply. If you find it, please tell me. Thank you.