You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Advanced challenge: Write a fucntion that checks the todos in the todo list and deletes the completed ones (we can check which ones are completed by seeing if they have the line-through styling applied or not).
// Advanced challenge: Write a function that checks the todos in the todo list and deletes the completed ones (we can check which ones are completed by seeing if they have the line-through styling applied or not).
23
85
functiondeleteAllCompletedTodos(){
24
-
// Write your code here...
86
+
// Filter out completed todos
87
+
todos=todos.filter(todo=>!todo.completed);
88
+
89
+
// Update the list
90
+
populateTodoList(todos);
25
91
}
92
+
93
+
// Add event listener for the remove all completed button
0 commit comments