5/8 stuck


#1

how do you solve 5/8 please i have tried everything


#2

Your just suppose to add a Contacts List. There are helpfull comments that will help you understand this code:

var friends = {
Bill: {
//Now we add properties for Bill here
firstName: "Bill", //This comma seperates the properties of friends.Bill
lastName: "Gates",
number: 54845645645,
// your Just suppose to add the adress on each profile
address:  ['One Apple Way','Redmond','WA','98052']
}, //This comma seperates the properties of friends
Steve: {
firstName: "Steve",
lastName: "Jobs",
number: 5665464564,
// your Just suppose to add the adress on each profile
address:  ['One Microsoft Way','Redmond','WA','98052']
}
};

#3

do you have to put a address on every one name


#4

Yes as it program states


#5

i have four names do you need the same address


#6

No you dont. You still have a problem? If so paste the code


#7

i pasted the code and it keeps saying there is a problem with my syntax


#8

:bug: alert sorry man. Or is there any Problems with my code? To the Flag :flags:


#9

there is nothing wrong with your code the thing that is confusing me is that i have four names


#10

Ok Let me make a Major check on it. Might find the minor Bug and make a way to attack it. Just give me a minute


#11

Nvm it already works for me: check this code again pls?

var friends = {
Bill: {
//Now we add properties for Bill here
firstName: "Bill", //This comma seperates the properties of friends.Bill
lastName: "Gates",
number: 54845645645,
// your Just suppose to add the adress on each profile
address:  ['One Apple Way','Redmond','WA','98052']
}, //This comma seperates the properties of friends
Steve: {
firstName: "Steve",
lastName: "Jobs",
number: 5665464564,
// your Just suppose to add the adress on each profile
address:  ['One Microsoft Way','Redmond','WA','98052']
}
};

#12

it says have you given all your friends a address property


#13

yeah thats what your suppose to do. Ok a mod will arrive here soon just wait for him. Im highly sorry i couldnt help. I tried my best. Good luck! and i Hope this is solved! Cheers!


#14

thanks
for all your help


#15

No Problem Sir! You too


#16

The friends objects, must be called bill and steve -- their firstNames are fine, it's just the objects themselves.


#17

Well why did my earlier code without your editon work? and his didnt? Just asking.


#18

I'm still checking on that.

Also, it is back in exercise 3. that the code checker insists on steve and bill -- after that it doens't check again. It seems less confusing to leave them at steve/bill so we don't confuse them with their firstNames.


#19

We really need to see your code. It sounds like you've missed one of the addresses - likely a comma or bracket or something is in the wrong place.

If you need it: How to post code in this forum.


#20

var friends = {
bill: {},
steve: {}
};
console.log(friends)
var friends = new Object();
friends.bill = new Object();
friends.bill.firstName = "Bill";
friends.bill.lastName = "Hauser";
friends.bill.number = 6515479000;

friends.steve = new Object();
friends.steve.firstName = "Steve";
friends.steve.lastName = "Milas";
friends.steve.number = 064178893;

friends.brian = new Object();
friends.brian.firstName = "Brian";
friends.brian.lastName = "Caccichotti";
friends.brian.number = 9783225642;

friends.william = new Object();
friends.william.firstName = "William";
friends.william.lastName = "Bergstrom";
friends.william.number = 6517447900;

console.log(friends);