Building an Address book help


#1

Can't seem to get pass this. Can someone please help. I believe I'm stuck in the fourth part:
Instructions
1. Define a function called printPerson that takes a parameter called person.
2. In the function body, print out the person parameter's firstName property by accessing it with a dot just like before. Then print a space, then their lastName in the same way.
3. Call the printPerson() function to print out the first item in the contacts array. The first item in an array is at position 0.
4. Then on the next line, call printPerson() again to print out the second item in the contacts array.

Here's what I have:

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];

// printPerson added her
var printPerson = function(person) {
console.log(person.firstName + " " + person.lastName);

};
console.log(printPerson(contacts[1]);


#2

Never mind, I just found my silly mistake. Here is the code for anyone who might be stuck.

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];

// printPerson added her
var printPerson = function(person) {
console.log(person.firstName + " " + person.lastName);

};
console.log(printPerson(contacts[0]));
console.log(printPerson(contacts[1]));