This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Solution URL: Solution URL
- Live Site URL: Live Site URL
- Semantic HTML5 markup
- CSS properties
- Flexbox
- Google Fonts
I learned how to use the forEach() method to add a function to each elemnt in an array.
Some resources that can help are:
- Twitter - @mishael_codes
- Instagram - @mishael_codes
- Frontend Mentor - @mishael-codes
I had trouble with selecting a specific rating but going through and selecting a rating. But with the help of TsbSankara's solution, I saw how to go about it using the :focus pseudo class selector and adding a click event to each of them using the forEach() method.

