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
Thanks in advance !