3. displaing people please help


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


#2

Here is how to define a function:

var functionName = function(parameter) {
code
};

In your case you added a semi-colon after the (person) parameter, hence making the code incorrect. Revise your printPerson function by deleting the semi-colon after the parameter.


#3

thx a lot now it works.