feature complete

This commit is contained in:
adrian
2025-08-16 23:47:33 +02:00
parent 02a4ff01b7
commit c939220602

10
todo.js
View File

@ -9,7 +9,7 @@ console.log("+----------------------------------------+");
let running = true; let running = true;
while (running) { while (running) {
let startQuestion = readline.question("wähle eine option\n1:Aufgabe hinzufügen:\n2:Aufgaben anzeigen\n3:Aufgabe schen\nq:beenden\n"); let startQuestion = readline.question("wähle eine Option:\n1:Aufgabe hinzufügen\n2:Aufgaben anzeigen\n3:Aufgabe abschließen\nq:beenden\n");
startQuestion.trim(); startQuestion.trim();
switch (startQuestion) { switch (startQuestion) {
@ -20,7 +20,7 @@ switch (startQuestion) {
showTask(); showTask();
break; break;
case "3": case "3":
deleteTask(); markTask();
break; break;
case"q": case"q":
running = false; running = false;
@ -55,3 +55,9 @@ function showTask() {
} }
function markTask() {
showTask();
let mark = readline.question("Welche Aufgabe möchtest du abschließen?\n")
mark = mark - 1;
toDo[mark].state = true;
}