Tell us what’s happening:
Describe your issue in detail here.
I have more of a question about this.
So the exercise has us deleting values in an object using delete foods.value;
So my question is this. Rather than continuously writing the delete keyword along with the expression, is it possible to just write it once using an array for the values?
Something like this…
delete foods.[value1, value2 etc…]???
Your code so far
let foods = {
apples: 25,
oranges: 32,
plums: 28,
bananas: 13,
grapes: 35,
strawberries: 27
};
// Only change code below this line
// Only change code above this line
console.log(foods);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
Challenge: Basic Data Structures - Use the delete Keyword to Remove Object Properties
Link to the challenge: