Learn localStorage by Building a Todo App - Step 33

Tell us what’s happening:

Hi there,
I am stucked at Step 33.
Step 33
Also, remove the existing code toggling the class hidden on taskForm inside the discardBtn event listener and call the reset function instead. That’s because when you click the Discard button, everything in the input fields should go away.

discardBtn.addEventListener(“click”, () => {
confirmCloseDialog.close();
taskForm.reset()});

If I try to use the Todo App and click the Discard button it works as it shoud, but I can’t pass the test.

Your code so far

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

/* file: styles.css */

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

discardBtn.addEventListener("click", () => {
  confirmCloseDialog.close();
  taskForm.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/127.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 33

Welcome to the forum @serenaferraro21

You should call the reset function.

Try calling the function instead of using it as a method.

Happy coding

Thank you :grinning: :grinning: :grinning: :grinning: :grinning: :grinning:

1 Like