Learn localStorage by Building a Todo App - Step 11

Tell us what’s happening:

A little stuck on this. I treid 2 approaches for this lesson; I used an implicit return so as to use no curly braces for this prompt. Wasn’t able to pass this lesson with this method. I also attempted to use curly braces and I still wasn’t able to pass this lesson. The help is appreciated. The 2 methods are illustrated below:

Your code so far

const dataArrIndex = taskData.findIndex((item) => item.id === currentTask.id ? true : false);

const dataArrIndex = taskData.findIndex((item) => {
  return item.id === currentTask.id ? true : false;

Your browser information:

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

Challenge Information:

Learn localStorage by Building a Todo App - Step 11

  • simply keep that “equality check” rest will be taken care of by “findIndex” method itself

happy coding :slight_smile:


What a simple solution how did i miss that loll, thank you

1 Like