3. Displaying People printing correctly but won't let me proceed



My function seems to be printing in the console correctly, but I can't proceed. I am getting the error message "Oops, try again. Did you create a function called printPerson?". I'm not sure if I'm not matching some syntax/spelling they are looking for or if I accidentally got the console to print but didn't correctly do the exercise.

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(contacts[person].firstName + " " + contacts[person].lastName);



your function calls should contain bob or mary as arguments:


so you should modify your function to handle this


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.