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

@kimanthigregory

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


I had problems with the JavaScript part specifically the part where i had to display different star based on the user chosen rating .i did my research and had a hang of it here is the code snippet


function userRating(ratingNumber) {
    ratingStar.innerHTML =" ";
    for (var i = 0; i<ratingNumber; i++) {
        var addDiv = document.createElement("div");
        addDiv.classList.add("add-rating-star");
        ratingStar.appendChild(addDiv);
    }
}

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