Learn localStorage by Building a Todo App - Step 40

Tell us what’s happening:

I get " Your arrow function callback should check if

item.id === buttonEl.parentElement.id

as an error message. However to my understanding this is what I have.

Your code so far

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

Your browser information:

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

Challenge Information:

Learn localStorage by Building a Todo App - Step 40

i think you have to make it to be one line, such ah

const editTask = (buttonEl) => {
const dataArrIndex = taskData.findIndex((item) => item.id === buttonEl.parentElement.id);

1 Like

I made a PR for it to allow the prettier style formatting.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.