restructured

This commit is contained in:
Karan 2021-12-03 14:31:13 +05:30 committed by GitHub
parent 4e64ce3e92
commit 12ffbcb07b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@
if (tasks.length > 0) {
tasks.forEach((task) => {
genItem(task.val, task.checked);
})
});
}
function saveTasks() {
localStorage.setItem("tasklist", JSON.stringify(tasks));
@ -43,7 +43,7 @@
tempTask.checked = true;
}
tasks.push(tempTask);
})
});
saveTasks();
}
function genItem(val, complete) {
@ -58,7 +58,7 @@
li.addEventListener("click", (e) => {
li.classList.toggle("ready");
buildTasks();
})
});
return val;
}
function createListItem() {