More People exercise


I think my code looks right but I keep getting the following error: "Did you remember to print out Mary's phone number?" which it clearly is doing each time. I need help please.

Edit: I have also tried removing the "=" after console.log but then it tells me "console.log is not a function".

var bob = {
    firstName: "Bob",
    lastName: "Jones",
    phoneNumber: "(650) 777-7777",
    email: ""

var mary = {
    firstName: "Mary",
    lastName: "Johnson",
    phoneNumber: "(650) 888 - 8888",
    email: ""

var contacts = [bob, mary];

console.log = (contacts[1].phoneNumber);


Wow this exercise is !@!$(!(^!($!. It would not be satisfied until I removed the spaces from Mary's phone number even though I originally entered it exactly as provided. Sooo dumb..


it should be console.log(contacts[1].phoneNumber); instead of console.log = (contacts[1].phoneNumber);


Correct. The confusion and frustration was coming from the error that was being displayed even with the appropriate formatting. (See Edit text)


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