MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / deleteTask

Function deleteTask

assets/js/todo-app.js:91–101  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

89
90// delete todo
91function deleteTask(index) {
92 var toDoItems = todoList.children;
93
94 for (var i = 0; i < todoList.children.length; i++) {
95 if (toDoItems.item(i).id == index) {
96 toDoItems.item(i).remove();
97 }
98 }
99
100 saveToDoItems();
101}
102
103// delete all todos
104deleteAllBtn.onclick = () => {

Callers

nothing calls this directly

Calls 1

saveToDoItemsFunction · 0.85

Tested by

no test coverage detected