Update task List

This commit is contained in:
Karan
2021-11-24 17:35:03 +05:30
parent b33768da4b
commit 4d8e0309d4
+4 -2
View File
@@ -6,8 +6,8 @@
.ready { .ready {
background-color: #ddd; background-color: #ddd;
color: red; color: red;
text-decoration: line-through; text-decoration: line-through ;
} }
</style> </style>
</head> </head>
<body> <body>
@@ -30,6 +30,7 @@
} }
function saveTasks() { function saveTasks() {
localStorage.setItem('tasklist', JSON.stringify(tasks)); localStorage.setItem('tasklist', JSON.stringify(tasks));
} }
function buildTasks() { function buildTasks() {
tasks.length = 0; tasks.length = 0;
@@ -70,6 +71,7 @@
}; };
tasks.push(myObj); tasks.push(myObj);
saveTasks(); saveTasks();
buildTasks();
} }
} }
</script> </script>