Don't need help, more reporting

Tell us what’s happening:

Ive been trying to find out why I have such a hard time going through FCC, but now i have the perfect example as to why its so confusing.

In this Exercise, we are shown how to READ a property from an object with . and notation…

the confusion here is, we are then tasked to SET a property of an object… While this really isn’t that hard, when you don’t know something, you simply don’t know, and without being shown how to do this, I just have to keep taking shots in the dark hoping i get it right, but its not really easy to take shots in the dark with syntax and things like that as there are so many things that can be wrong.

How am I supposed to know the syntax to SET a property of an object, if we were just shown how to READ the property.

This exercise is a TERRIBLE way to teach people.

You’re basically giving them something, to help us in the exercise, by giving an example before hand, but the example doesn’t help if the exercise calls for us to do something we haven’t been shown yet.

Your code so far


let foods = {
apples: 25,
oranges: 32,
plums: 28,
};

// Only change code below this line

// Only change code above this line

console.log(foods);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36.

Challenge: Add Key-Value Pairs to JavaScript Objects

Link to the challenge:

Edit: fair do’s, it doesn’t tell you directly.

It’s asking you to make a jump from how assignment works as @ilenia says & how you read properties. It’s the same thing you’ve already been taught regarding variables, but I understand if it doesn’t click for you.

As the course goes on, there will be more and more stuff that won’t be spoon-fed. In this case, you’ve got a point, I understand how it’s confusing you. I realise it’s frustrating, but can you try and watch your tone a little bit: there are a great many people here who will be happy to help you, shouting about it isn’t going to help anyone.

when you met the assignment operator you were taught that what is put to the right of it will be assigned (stored) in what is to the left of it

here is explained how to access object properties

you can put the two together

The transition from duplication of preexisting code to generation of new code is hard, but nobody will hire you to duplicate preexisting code.

I see no reason for the challenge not to have an example of setting a key/value. It seems very odd to show how to get one, but not set one, considering the point of the challenge.

Can you figure it out without seeing an example, sure you can, but why not just show the syntax?

1 Like

Yes, I looked at it at first and thought it just meant add properties to that object, and it was just confusingly written

There is already a challenge in the basic javascript part of the curriculum that is exactly the same, except it actually shows the syntax.

This challenge, which is part of the Basic Data Structures seems completely redundant and just incorrectly implemented.

Edit: I made an issue for it.