Learn localStorage by Building a Todo App - Step 43

Tell us what’s happening:

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

I have no idea why I can’t get my code to work on this step. I’ve been trying for days and used many permutations of code. According to the console, I am doing everything that it is asking. Other people have had similar issues with this particular step. “findIndex() is a function so it requires a function inside” was able to help someone but I don’t know exactly how to interpret it…

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));
const reset = () => {

// 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/17.3.1 Safari/605.1.15

Challenge Information:

Learn localStorage by Building a Todo App - Step 43

  • This statement should be found between the curly braces of the const deleteTask = (buttonEl) => {};
  • This statement doesn’t need the parentheses around item.id === buttonEl.parentElement.id
1 Like

Thanks for your help! I had tried that specific solution before but still, I tried it again. Again it didn’t work. So I opened the page in Crome and was finally able to get it to work! There must be some bug when using Safari to access the site.

In any case, you were a huge help nonetheless. I had been stuck for a while so - BIG thank you!

1 Like