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


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/building-an-address-book/0/3

<In what way does your code behave incorrectly? Include ALL error messages.>
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);
}

printPerson(0);
printPerson(1);

<do not remove the three backticks above>

#2

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]


#3

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