Skip to content

Commit 8a8fb89

Browse files
committed
Feat: clear all tasks on btn click
1 parent 3e6f764 commit 8a8fb89

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

script.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ taskAddBtn.addEventListener("click", () => {
2626
alert("Task must be of at least 5 characters to be registered.");
2727

2828
});
29+
30+
// remove all childs of "taskContainer" class
31+
clearAllTaskBtn.addEventListener("click", () => {
32+
33+
if(confirm("All the tasks will be cleared permanently."))
34+
{
35+
// taskContainer.removeChild();
36+
}
37+
});

0 commit comments

Comments
 (0)