I'm making a to-do-list in JavaScript and HTML using unordered list. When a task is added, it's saved in local storage as follows:
tasksInLocalStorage.push({
index: `${tasksInLocalStorage.length}`,
value: input.value,
isDone: false
});
localStorage.setItem("tasks", JSON.stringify(tasksInLocalStorage));
When I click on a specific li element, I apply a class to it using element.classList.toggle('name').
When the class is applied, I want the isDone: false inside the object in the array to be set to true, but I don't know how to reach the correct object.