Tell us what’s happening:
Hi, I hope someone can help me with this question.
For the challenges 6 throught 9, when creating event listeners, why some of them required curly bracket "{} ", and some of them dont?
(challenges 6 and 8 dont ask for curly brackets, but 7 and 9 does)
Your code so far
openTaskFormBtn.addEventListener(“click”, () =>
taskForm.classList.toggle(“hidden”)
);
closeTaskFormBtn.addEventListener(“click”, () => {
confirmCloseDialog.showModal();
});
cancelBtn.addEventListener(“click”, () => confirmCloseDialog.close());
discardBtn.addEventListener(“click”, () => {
confirmCloseDialog.close();
taskForm.classList.toggle(“hidden”);
});
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
// User Editable Region
Challenge Information:
Learn localStorage by Building a Todo App - Step 10