Learn localStorage by Building a Todo App - Step 48

Tell us what’s happening:

I am sure my lines are correct, I am even copying the answer from the help box,

### Your code so far

```html
<!-- 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];

// this line won’t pass the test
  currentTask.title = titleInput.value;
  currentTask.date = dateInput.value;
  currentTask.description = descriptionInput.value;
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0

Challenge Information:

Learn localStorage by Building a Todo App - Step 48

You are doing totally opposite.
You have to assign currentTask.title to titleInput.value. But you are assigning titleInput.value to currentTask.title.

Just reverse them.

1 Like