-
-
Notifications
You must be signed in to change notification settings - Fork 207
WM | ITP-JAN-25 | HATEF_EIDI | Module-Data-Groups | Sprint 3| Todo List #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // Function to create list items | ||
| function createListItem(todo, index, isCompleted) { | ||
| const listItem = document.createElement("li"); | ||
| listItem.className = 'todo-item'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like I said in reading-list project, please define your constants at the beginning of your script not inside of your functions.
| // Creating the complete/uncomplete button | ||
| const completeButton = document.createElement("button"); | ||
| completeButton.textContent = isCompleted ? 'Uncomplete ❌' : 'Complete ✔️'; | ||
| completeButton.onclick = () => toggleComplete(index, isCompleted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good way to use ternary operator
| populateTodoList(); | ||
| createParagraph(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smooth way of handling toggle, and I also like the way you destructure object
halilibrahimcelik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done everything seems to be okay, you can close this PR.
Learners, PR Template
Self checklist
Changelist
creating task, adding completed label to the tasks, and deleting all the completed tasks together.
Questions
Ask any questions you have for your reviewer.