Learn localStorage by Building a Todo App - Step 11

Tell us what’s happening:

Your code so far

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


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 (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

Hi! I hope you’ve found the answer by now! But I think you’re overthinking it. Just follow the instructions exactly without adding anything additional.

Regarding the arrow function, if you have more than one line it will always require the curly brackets starting just after the arrow. BUT! for this step only one line is needed and you do not need the brackets.

The condition in findIndex is already a boolean expression, so there’s no need for the if(dataArrIndex===true) check.

thank you I got it!!, it didn’t required to use true or false statement