Learn localStorage by Building a Todo App - Step 16

how to declutter…do i need to use any method or hypen?

Your code so far:

taskData.forEach(()=>{id, title, date, description});

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 16

  • use a pair of “open and close bracket” (i.e. ({…}))
  • otherwise it wont consider that as a returned valued and thus throw error!!

happy coding :slight_smile:

1 Like

{id, title, date, description} should be the parameter for the forEach callback. It is asking you to use destructuring for the parameter.

[{ name: "john", age: 42}].forEach(({name, age}) => console.log(name, age) // "john" 42);
1 Like