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: