Learn localStorage by Building a Todo App - Step 49

Tell us what’s happening:

I got stuck on this step, anyone with the solution please

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 = updateTask;
  
}

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

Challenge Information:

Learn localStorage by Building a Todo App - Step 49

We can’t write the solution for you. Can you talk about how you are stuck and what you’ve tried?

You were trying to go higher level on this one than what was needed. It just wants you to assign the text “Update Task” to display on the button, not call a function named ‘updateTask’.