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 using scss and flexbox

@sreehariv-code

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 time implementing and including javascript functionalities into challenge. Any feedbacks on best practice for implementing the functions in javascript for future reference. Feel free to provide with changes to be made in the same

Community feedback

Md5 dalton 1,430

@md5dalton

Posted

Hi Sreehari, Good work on the challenge.

I just want to point out that in your future projects try to make your code DRY (Don't repeat yourself) - that is is a principle of software development aimed at reducing repetition of software patterns.

I'll give you an example. I noticed document.querySelector() has been repeated quite a couple of times. My suggestion would be to write a helper function const getDOM = selector => document.querySelector(selector) and you can use that function where you need that functionality anywhere in your script.

This is a small project, the advantages may not be that apparent.

Marked as helpful

1

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