Tell us what’s happening:
First of all thank You for creating such an amazing content. Ability to learn in such a way is unique and very helpful.
About the Todo App —> When updating a task we are changing the innerText :
addOrUpdateTaskBtn.innerText = “Update Task”;
addOrUpdateTaskBtn.ariaLabel = “Update Task”;
and then when we are creating new task the button stay with text "Update Task.
I hope i’m helping the content creator in a perfecting his masterpiece
### Your code so far
const editTask = (buttonEl) => {
const dataArrIndex = taskData.findIndex(
(item) => item.id === buttonEl.parentElement.id
);
currentTask = taskData[dataArrIndex];
titleInput.value = currentTask.title;
dateInput.value = currentTask.date;
descriptionInput.value = currentTask.description;
addOrUpdateTaskBtn.innerText = “Update Task”;
addOrUpdateTaskBtn.ariaLabel = “Update Task”;
taskForm.classList.toggle(“hidden”);
}
WARNING
The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.
You will need to take an additional step here so the code you wrote presents in an easy to read format.
Please copy/paste all the editor code showing in the challenge from where you just linked.
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn localStorage by Building a Todo App - Step 57