Interactive rating component

Please log in to post a comment
Log in with GitHubCommunity feedback
- @SortJakke
I recommend using addEventListener on the <form> instead of inline event methods. This will allow you to capture events in a more organized and centralized way. Additionally, by accessing the event within the listener, you’ll have direct access to all the form inputs through event.target. This approach not only simplifies your code but also improves the maintenance and scalability of the script, leaving your HTML cleaner without the need to attach events directly to the elements.
Marked as helpful
Join 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