Build a Todo App using Local Storage - Step 11

Tell us what’s happening:

I don’t know why i’m getting an error message,
here’s my code for step 11,

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

here is the error message :slight_smile: 3. Your arrow function callback should check if item.id === currentTask.id.

I thought that my code should pass for step 11,

what am i missing?

Your code so far

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

/* file: styles.css */

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

const dataArrIndex = taskData.findIndex((item) => {
  item.id == currentTask,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/26.4 Safari/605.1.15

Challenge Information:

Build a Todo App using Local Storage - Step 11

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-todo-app/64e4eec13546c06d61a63d59.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hi

You have a syntax error on your second dot notation.

Your code produces an error message that should help you on the way.

Also you have not returned the function