why doesn’t it work if the value is equated to true?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
if(formInputsContainValues === true){
confirmCloseDialog.showModal();
}
else{
reset();
};
// 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/131.0.0.0 Safari/537.36
Challenge Information:
Learn localStorage by Building a Todo App - Step 35
As Teller points out, there are things that evaluate to true and you don’t have to do === true.
You can test if something is “truthy” as it is called like this: console.log(Boolean(testValuePutHere)); and it will print to console if testValuePutHere is truthy or falsy. I hope this helps your understanding.