What is wrong with my code : Contact List Adding properties


#1



Contact List
https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/4?curriculum_id=506324b3a7dffd00020bf661#

ReferenceError: Bill is not defined
Oops, try again. It looks like your friends don't have the firstName property.


Bill.firstName="Bill";
Bill.lastName="Giasou";
Bill.number="1234";

friends.Steve=new Object();
Steve.firstName="Steve";
Steve.lastName="allo"
Steve.number="5678";

friends.Jim=new Object();
Jim.firstName="Jim";
Jim.lastName="pap";
Jim.number="91011"

friends.Nik=new Object();
Nik.firstName="Nik";
Nik.lastName="papa";
Nik.number="121314";


#2

var friends=new Object();
friends.Bill=new Object();
Bill.firstName="Bill";
Bill.lastName="Giasou";
Bill.number="1234";

friends.Steve=new Object();
Steve.firstName="Steve";
Steve.lastName="allo";
Steve.number="5678";

friends.Jim=new Object();
Jim.firstName="Jim";
Jim.lastName="pap";
Jim.number="91011";

friends.Nik=new Object();
Nik.firstName="Nik";
Nik.lastName="papa";
Nik.number="121314";


#3

Have a look on this link:

Click here


#4

Hi so you first create a object friends

var friends=new Object();

then you add object to your friends object

friends.steve=new Object();

So if you want to add propriety to that new object you should do it like that

friends.steve=new Object();
friends.steve.firstName = "Steve"

And I think that your object name should be downcase steve and bill


#5

var friends=new Object();
friends.Bill=new Object();
friends.Bill.firstName="Bill";
friends.Bill.lastName="Giasou";
friends.Bill.number="1234";

friends.Steve=new Object();
friends.Steve.firstName="Steve";
friends.Steve.lastName="allo";
friends.Steve.number="5678";

friends.Jim=new Object();
friends.Jim.firstName="Jim";
friends.Jim.lastName="pap";
frineds.Jim.number="91011";

friends.Nik=new Object();
friends.Nik.firstName="Nik";
friends.Nik.lastName="papa";
friends.Nik.number="121314";

this is what you mean?

but now it says
Oops, try again. It looks like you have an error in your code! Check the message for more details: ReferenceError: frineds is not defined
ReferenceError: frineds is not defined


#6

r friends=new Object();

friends.Bill=new Object();
friends.Steve=new Object();
friends.Jim=new Object();
friends.Nik=new Object();

friends.Bill.firstName="Bill";
friends.Bill.lastName="Giasou";
friends.Bill.number="1234";

friends.Steve.firstName="Steve";
friends.Steve.lastName="allo";
friends.Steve.number="5678";

friends.Jim.firstName="Jim";
friends.Jim.lastName="pap";
frineds.Jim.number="91011";

friends.Nik.firstName="Nik";
friends.Nik.lastName="papa";
friends.Nik.number="121314";
this is wrong to
it says
Oops, try again. It looks like you have an error in your code! Check the message for more details: ReferenceError: frineds is not defined


#7

var friends=new Object();

friends.Bill=new Object();
friends.Steve=new Object();
friends.Jim=new Object();
friends.Nik=new Object();

friends.Bill.firstName="Bill";
friends.Bill.lastName="Giasou";
friends.Bill.number="1234";

friends.Steve.firstName="Steve";
friends.Steve.lastName="allo";
friends.Steve.number="5678";

friends.Jim.firstName="Jim";
friends.Jim.lastName="pap";
frineds.Jim.number="91011";

friends.Nik.firstName="Nik";
friends.Nik.lastName="papa";
friends.Nik.number="121314";
it says
Oops, try again. It looks like you have an error in your code! Check the message for more details: ReferenceError: frineds is not defined

ReferenceError: frineds is not defined


#8

HI this line

frineds.Jim.number="91011";

you wrote frineds instead of friends


#9

yes this is the problem.thank you