6 list them all question


var friends = new Object()
friends.steve = {FirstName: "Steve", LastName:"Jobs", number: "(206) 555-5555",Address: ["One Apple Way","Applewood", "CA","90210"]}
friends.bill = {FirstName: "Bill", LastName:"Gates", number: "(206) 666-6666", Address: ["One Microsoft Way","Redmond","WA","98052"]}

var list = function (friends){
for (var key in friends)

I have no clue what I am even doing on this one.

1.Create a function list that takes a single parameter. CHECK

2.In the body of the function, write a for/in loop. I GUESS CHECK

3.In the loop, use console.log to print out the key. (For example, if 4.you only have bill and steve as entries, list should just print out "bill" and "steve".) ?????

This function makes no sense to me whatsover, and when I run the above function it just prints out the friends object (I think)


for (var key in friends) //<------There!! :D 

Missing an opening bracket