Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
First solution using JS.
What challenges did you encounter, and how did you overcome them?Mostly working out the logic behind the JS.
What specific areas of your project would you like help with?Any feedback regarding the JS functions, is my solution too complex?
Community feedback
- @bartoszdudziak-devPosted 6 months ago
- It works well but in my opinion it is too much nested I would say.
- I recommend you read about event delegation. You can have just one event listener attached to buttons container and work with
target
property. It is better for performance. - This can be helpful:
if(!e.target.closest('.button') return;
Marked as helpful1
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