What's wrong with my code in 3/6 "Displaying People"?



I created function and the function works, but i have this error message:
"Oops, try again. Did you create a function called printPerson"
what is wrong?

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(number){
    console.log(contacts[number].firstName + " " +contacts[number].lastName);



HI you should create a function printPerson with one argument person

var printPerson = function(person) {
    #do somthing

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.
do ti like that llike that

console(person.firstName + "  " + person.lastName) ;

then you should call the function printPerson with contats[0] and another with contats[1]


I already found another way:
function printPerson(person) {
console.log(person.firstName + " " + person.lastName);