Build a Todo App using Local Storage - Step 11

Tell us what’s happening:

I’m fairly sure this is valid. Why is it not- is there another way of doing IF statements that I should be using?

Your code so far

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

/* file: styles.css */

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

const dataArrIndex = taskData.findIndex((item) => {
  if (item.id === currentTask.id) {

  };
});

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Challenge Information:

Build a Todo App using Local Storage - Step 11

in the callback for the findIndex function you need to return the comparison, as the findIndex function relies on the value returned from the callback to find the index of the element, specifically it finds an element when the callback function returns true (or a truthy value)

have you passed it because iam on the same problem and i don’t get what ILM suggested you to return from calling back the function !!