Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive Rating Component

AnasIsmai1 240

@AnasIsmai1

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I applied a few error handling cases into my program as well as use forEach loop to avoid using variables for all the buttons, I added an eventlistener to the button which would check if the button was a submit button or a rating button via checking if it contains an attribute of value. I was able to do a few tests and started using the console in the browser efficiently.

What challenges did you encounter, and how did you overcome them?

I initially faced the issue of setting the rating based on assigning the value of a variable within the forEach loop but that didnt work since it was always set on a local scope and not the global one. I then directly set the value of the rating via .textContent() property within the loop which worked out pretty well.

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

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