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

Function toggleToDoItemState

assets/js/todo-app.js:81–88  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

79
80// Toggle completed
81function toggleToDoItemState(element) {
82 if (element.classList.contains("completed")) {
83 element.classList.remove("completed");
84 } else {
85 element.classList.add("completed");
86 }
87 saveToDoItems();
88}
89
90// delete todo
91function deleteTask(index) {

Callers

nothing calls this directly

Calls 1

saveToDoItemsFunction · 0.85

Tested by

no test coverage detected