For / in loop


I have no idea at all what a for / in loop is. Can someone please explain?
Here's my code:

     for (var key in object)   
friends = {
 bill: {firstName: 'Bill', lastName: 'Dribble', number: '111-323-6784', address: ['seven hot road','wipple','WA','87993']},   
 steve: {firstName: 'Steve', lastName: 'Arcensaw', number: '543-766-1532', address: ['rest ave','yufy','TX','21555']},   
  billy: {firstname: "Billy",
        lastName: "Gates",
        number: "(206) 555-5555",
        address: ['One Microsoft Way','Redmond','WA','98052']
  elias: {firstName: 'Elias', lastName: 'Tristan', number: '124-578-9012', address: ['Florence Ave', 'Pittsburgh','PA','15202']}

The error I get is: Oops, try again. Did you create a function called list?


Post muli-line code with three backticks (`) on a line above and a line beneath your code. They should be on separate lines from anything else.


Also a for / in loop should look like this,

for (var key in object) {
    //do something

And your function should end right after the for / in loop.


Thanks dantemp that really helped!!


No problem, 'swhat I'm here for.