Learn localStorage by Building a Todo App - Step 6

Tell us what’s happening:

Not sure what I am missing. It is asking:
Your event listener’s callback function should use the classList.toggle() method to toggle the hidden class on the taskForm element. Refer back to the example provided in the description.

I would assume that means taskForm.classList(‘hidden’) but I must be mistaken.

Your code so far

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

/* file: styles.css */

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

openTaskFormBtn.addEventListener('click', () => {
  taskForm.classList.toggle('hidden')
});

// 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/124.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 6

It’s working but the tests need you to use the implicit return syntax. You use it when you only have one line of code to write after your =>, you omit the curly braces {} and semicolon ;
and just type that one statement.

Example:

btn.addEventListener("click", () => alert("Hello World!"));
1 Like

As mentioned, there is an issue with the tests.
Issue was created here

Thank you so much, that was it!

1 Like

As of 2 hours ago, someone is working on that pull request! Awesome to see.