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 with HTML, CSS and JS

Giorgi 200

@siduki

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


Hello community. This my first solution for JS challenges, I made it with pure HTML, CSS and JS DOM manipulation.

Please if you can, check my solution and give me advices if any.

Thank you.

Community feedback

@fazzaamiarso

Posted

Hello Giorgi! Nice Solution!

I have quick tips for you.

  • You can simplify your showNumber function a lot.
function showNumber() {
//No need to check for value as all checks have the same statement
  document.getElementById("number").innerHTML = this.value;
}
  • It is recommended to use === instead of == for equality checking. Why? because == will try to convert the value to same type, which can makes it vulnerable to bugs.

I hope it helps! Cheers!

Marked as helpful

0

Giorgi 200

@siduki

Posted

@fazzaamiarso Thank you.

How I understand, I can remove that line, where I check buttons value yes? My

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