5/8 stuck


#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);


#21

Thanks! -- You have not added any addresses yet. Do you need help doing one of those?


#22

yes please i need help


#23

Ok Sorry for the Rush


#24

The exercise is asking for an array with the address info in it. As @amanuel2 posted for steve:

address:  ['One Microsoft Way','Redmond','WA','98052']

Using the format that you've started with, you can do yours this way:

friends.steve.address = ['One Microsoft Way','Redmond','WA','98052'];

#25

That is creating an object called friends that contains two more objects: bill and steve.

You shouldn't recreate them again down further:

and here:


#26

3 posts were split to a new topic: 5/8 stuck


#29

So was it a bug? :bug:


#30

From what I can see, there have been no addresses added yet.