Learn localStorage by Building a Todo App - Step 49

Tell us what’s happening:

What is wrong with this code, it seems to be set exactly how the question has demanded it…

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 = Update Task;
  
}

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

Challenge Information:

Learn localStorage by Building a Todo App - Step 49

1 Like

It is listed as a string so it needs quotation marks.

Where is it listed as a string?

1 Like

Ok it says to set it to two words with capitol letters so that eliminates whether or not it is a form of JS code and the fact that it is innerText.

innerText should alert you that it needs to be in quotes. i was stuck on that part too!