Design comparison
Solution retrospective
I have no idea how to deal with event listeners for dynamic elements and how to filter li elements witch checked checkboxes. I left the footer section as a whole. I will appreciate it if anybody recommends some resource for a good understanding of the topic mentioned.
Community feedback
- @harsht67Posted over 2 years ago
You can try javascript filter method to filter li items (todos) based on checked/completed property of todo item. (which holds the state of checkbox) Then cases will be :
- active : todos.filter(todo => !todo.completed)
- completed : todos.filter(todo => todo.completed)
Marked as helpful0@husnain214Posted over 2 years ago@harsht67 Thank you so much for taking the time to answer my question. I kept delaying learning about many array methods and I guess that's where I made the mistake.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord