4 keeps saying unexpected token and wont run


#1

it keeps saying unexpected token ) but I for the life of me cant see the problem ) in the code. can anyone help me ?
here is my code:

var bob = {
firstName: "Bob",
lastName: "Jones",
phoneNumber: "(650) 777-7777",
email: "bob.jones@example.com"
};

var mary = {
firstName: "Mary",
lastName: "Johnson",
phoneNumber: "(650) 888-8888",
email: "mary.johnson@example.com"
};

var contacts = [bob, mary];
function printPerson (person) {
console.log(person.firstName + " " + person.lastName);
};
var list = function (){
var contactsLength = contacts.length;
for ( i=0 , i printPerson( contacts[i] )
};
list();
};
list();


#2

Your list function dosn't look like it should and there is little mess with the brackets, it should look mor like this:

var list = function(){
    var contactsLength = contacts.length;
    for (var i = 0; i < contactsLength; i++)
{
      printPerson(contacts[i]);
   
}

}