P.5 Tossing in an array


#1



I am stuck at 5 (https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/5?curriculum_id=506324b3a7dffd00020bf661)


SyntaxError: missing } after property list


var friends = new Object();
friends.people = "yes";
friends.machines = false;
friends.bill = {
    firstName: "Bill",
    lastName: "Gates",
    number: "(206) 555-5555",
    address: ["By the Window","Redmond", "WA", "557ty"]

    };
friends.steve = {
    firstName: "Steve"
    lastName: "Jobs"
    number: "(609) 666-7777",
    address: ["Your local Apple tree","Los Angeles", "CA","6g3q6"]

    };


#2

There are commas missing in your code

firstName: "Steve",
lastName: "Jobs",


#3

Jeez, I got another problem now it says
"Did you put an address property for your friends?"
And I did.


#4

The error occurs because of the dot notation you have in your code
remove all -> friends.


#5

What? Can you explain in more detail please


#6

Using dot notation should be ok, but probably .people and .machines are expected to have an address property as well :slight_smile:


#7

Thanks, now I understand.