#4 listing everybody


#1



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(var i = 0; i < contactsLength; i++) {
printPerson(contacts[i]);
}
}
list();






I don't know what is wrong with it. I've looked at other peoples topics over this lesson, but none of them seem to help me with my problem.


#2

your function printPerson is missing its closing curly bracket:

function printPerson(person) { <- no matching closing curly bracket

#3

Wow... something so simple so easily over looked. Thank you