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-main

Matthew 380

@matthew-marco

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


first project with js any tips

Community feedback

P

@Eileenpk

Posted

Hi Matthew!

Your project looks great, it seems like you put a lot of hard work into it.

I thought this might be a helpful tip.

Consider your naming conventions. If you had never seen this code before would you know right away without looking at the HTML what p (in the JavaScript) was? It takes time to think of very descriptive names for things, but it's worth trying to write code with the knowledge that out in the wild ( and in a professional setting) more time will be spent reading, and editing it than the initial writing of the code. Anything we can do to make it easier for the next dev on the project should be done.

For example, I would change let p = document.querySelector(".numrate"); to

let selectedRating = document.querySelector(".numrate");

Other than that your code is awesome, keep up the good work!!

Hope you found this helpful!

Marked as helpful

1

Matthew 380

@matthew-marco

Posted

@Eileenpk

thank you so much for your comment I will consider that in my next project

0

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