Skip to content

Commit 18e38bd

Browse files
committed
modify the logic in quiz 1
1 parent fa75e43 commit 18e38bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quiz/1_todo/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ function deleteTodo(index) {
2525
}
2626

2727
function completeTodo(index, todo) {
28-
const completed = todo;
29-
todoItems.splice(index, 1, completed);
28+
todo.done = true;
29+
todoItems.splice(index, 1, todo);
3030
}
3131

3232
// business logic

0 commit comments

Comments
 (0)