Learn localStorage by Building a Todo App - Step 34

Tell us what’s happening:

Task is to create variable that checks whether one of three values is true.What is wrong?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

closeTaskFormBtn.addEventListener("click", () => {
  confirmCloseDialog.showModal();
  const formInputsContainValues=titleInput.value.trim()!==''||dateInput.value.trim()!==''||descriptionInput.value.trim()!==''
  
});

// 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/134.0.0.0 Safari/537.36 Edg/134.0.0.0

Challenge Information:

Learn localStorage by Building a Todo App - Step 34

you don’t need to do all this, you can check if the value is falsy (empty string) or truthy

I feel like the tests should allow checking for an empty string.

Especially considering the tests are accepting a null check for some reason. Checking for an empty string seems a lot more reasonable than a null check. Not even sure the value can be null, isn’t the value property always a string (empty or otherwise)?

https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64faca774fd9fd74bc084cc9.md

you are right, I have no idea were that comes from tbh, maybe worth an issue

Done

I tried using the Boolean function and that didn’t take either.

not what I meant, also using the OR operator you are in a boolean context, you don’t need the Boolean function for elements to be treated as truthy or falsy