Basic Data Structures - Add Key-Value Pairs to JavaScript Objects

Tell us what’s happening:

The result does not work, wrong requirement. Please help to check

Your code so far

let foods = {
  apples: 25,
  oranges: 32,
  plums: 28
};
// change code below this line
foods["bananas"] = 13;
foods["grapes"] = 35;
foods["strawberries"] = 27;
// change code above this line
console.log(foods);

Your browser information:

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

Challenge Information:

Basic Data Structures - Add Key-Value Pairs to JavaScript Objects

reset the challenge, the food object doesn’t match the one in the seed code. Then do the things again, which are correct.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.