What's wrong with my code


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

// printPerson added here
var printPerson=function(person)
{
console.log(person.firstName+" "+person.lastName);
};
printPerson(contacts[0]);
printPerson(contacts[1]);

This is printing Bob Jones to the console but it saying "your function didn't print Bob Jones to the console."


#2

I got it.There is a problem with the space between "Bob"and "Jones". In console.log there should be a space between person.firstName and person.lastName.