From 9158fcdd844deec7ca622bb9d3c20a2531d82fef Mon Sep 17 00:00:00 2001 From: Farid Zouheir <72947724+zhrfrd@users.noreply.github.com> Date: Fri, 12 Jul 2024 00:39:37 +0100 Subject: [PATCH] fix(curriculum): Clarify callback requirement (#55489) --- .../64e4e78a7ea4a168de4e6a38.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md index 9cafc4b1195..b3bc8f116a1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md @@ -17,9 +17,9 @@ The `toggle` method will add the class if it is not present on the element, and element.classList.toggle("class-to-toggle"); ``` -Add an event listener to the `openTaskFormBtn` element and pass in a `click` event for the first argument and an empty callback function for the second argument. +Add an event listener to the `openTaskFormBtn` element and pass in a `"click"` event for the first argument and an anonymous callback function for the second argument. -For the callback function, use the `classList.toggle()` method to toggle the `hidden` class on the `taskForm` element. +Inside the callback function, use the `classList.toggle()` method to toggle the `"hidden"` class on the `taskForm` element. Now you can `click` on the "Add new Task" button and see the form modal.