Learn localStorage by Building a Todo App - Step 43

Tell us what’s happening:

I have completed the task and the error statement is telling me to set callback to what it is already set to.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

const deleteTask = (buttonEl) => {
  const dataArrIndex = taskData.findIndex(item) => item.id === buttonEl.parentElement.id
}

// User Editable Region

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/15.5 Safari/605.1.15

Challenge Information:

Learn localStorage by Building a Todo App - Step 43

The findIndex method takes a function as an argument, which we commonly refer to as a callback function. That means that everything inside the parens for the findIndex argument must be a function. Do you have a complete function inside those parens?

3 Likes

awesome I figured it out, thanks for the help!

1 Like