@ -62,6 +62,7 @@ function addListItem(task: Task) {
});
editbtn.addEventListener("click",function(){
label?.focus();
changeTask(item);
});
}
@ -74,3 +75,20 @@ function loadTasks(): Task[] {
if(taskJSON==null)return[];//if taskJSON is null, return to an empty array
returnJSON.parse(taskJSON);// if it's not null, return to the taskJSON. As : Task[] is written after func loadTasks(), it will specifically parse the array. Without it, it will parse anything