Learn localStorage by building a TodoApp - step

Hi everyone !

I’m stuck on this step of the project.

" Inside the closeTaskFormBtn event listener, use const to create another variable named formInputValuesUpdated . Check if the user made changes while trying to edit a task by verifying that the titleInput value is not equal to currentTask.title , or the dateInput value is not equal to currentTask.date , or the descriptionInput value is not equal to currentTask.description .

I did this :

  const formInputsContainValues =
    titleInput.value || dateInput.value || descriptionInput.value;

  const formInputValuesUpdated =
    titleInput.value !== currentTask.title ||
    dateInput.value !== currentTask.date ||
    descriptionInput.value !== currentTask.description;

  if (formInputsContainValues) {
    confirmCloseDialog.showModal();
  } else {
    reset();
  }
});

It doesn’t work, I have this message when I try to submit my code :
" Your formInputValuesUpdated variable should check if titleInput.value is not equal to currentTask.title ."

I don’t understand why because my syntax seems correct to me :confused:

Thanks in advance !

Which step? You never gave us the step number? In the future, it’s best to use the Help button in the step because it will automatically include a link to the step.

Yes I forgot it in the title ! It’s the step 47

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-localstorage-by-building-a-todo-app/step-47

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