Add Key-Value Pairs to JavaScript Objects help

Add Key-Value Pairs to JavaScript Objects help
0

#1

what is the problem :frowning:


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

// change code below this line
let foods["bananas"] = 13;
let foods["grapes"] = 35;
let foods["strawberries"] = 27;

// change code above this line

console.log(foods);

Your browser information:


#2

You do not declare object properties (i.e. your let). You only declare the objects and then make assignments to the applicable object property.


#3

got it :sweat_smile: thank you