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