Can someone check my code too plz


#1

Continuing the discussion from 3. Displaying People:

<`

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 = [mary, bob];
var printPerson = function(person)
{
return person.firstName + " " + person.lastName
};
printPerson(contacts[0]);
printPerson(contacts[1]);

`


#2

HI this line

return person.firstName + " " + person.lastNam

instead of return you should use console.log()


#3

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