Learn localStorage by Building a Todo App - Step 31

Tell us what’s happening:

Your code so far

It keeps saying that this line of code isn’t working. You should move taskData.forEach() and its content into the updateTaskContainer() function.

My code so far
Const updateTaskContainer = () => {

taskData.forEach(
({ id, title, date, description }) => {
(tasksContainer.innerHTML += <div class="task" id="${id}"> <p><strong>Title:</strong> ${title}</p> <p><strong>Date:</strong> ${date}</p> <p><strong>Description:</strong> ${description}</p> <button onclick="editTask(this)" type="button" class="btn">Edit</button> <button onclick="deleteTask(this)" type="button" class="btn">Delete</button> </div> )
}
);
}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15

Challenge Information:

Learn localStorage by Building a Todo App - Step 31

Have you changed anything in the taskData.forEach()?

No just copy and paste from what I coded the task data obj on to this function

This is the taskData.forEach()?

taskData.forEach(
    ({ id, title, date, description }) => {
        (tasksContainer.innerHTML += `
        <div class="task" id="${id}">
          <p><strong>Title:</strong> ${title}</p>
          <p><strong>Date:</strong> ${date}</p>
          <p><strong>Description:</strong> ${description}</p>
          <button type="button" class="btn">Edit</button>
          <button type="button" class="btn">Delete</button>
        </div>
      `)
    }
  );

Yours is different.

1 Like

Thank you so much man for your help. I really appreciate it.

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