Learn localStorage by Building a Todo App - Step 44

Tell us what’s happening:

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

I am completely lost with this step. Help, please?

Your code so far

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

/* file: styles.css */

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

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

// User Editable Region

Your browser information:

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

Challenge Information:

Learn localStorage by Building a Todo App - Step 44

It is written document.remove and you need to give it a parameter. (Check the instructions again to see what you need to remove from the DOM)

Also you didn’t attempt the second part of the step which is to use splice.