Learn localStorage by Building a Todo App - Step 49

Tell us what’s happening:

Set the innerText of the addOrUpdateTaskBtn button to Update Task. We have not created any button or variable as addOrUpdateTaskButton. Can anyone help me in understanding this Help. I am very much helpful for your help. Best Regards

Your code so far

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

/* file: styles.css */

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

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
  
}

// 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/128.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 49

Hi there!

Your code very good so far. Now assign the string Update Task to it.

Edit:

Read you JavaScript code above from challenge editor, there you can see created button elements.
Edit: in the html file on line number 34, you can see the button element.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.