interactive assessment component solution with html, css, javascript

Solution retrospective
-
I can't understand how to select only one number at a time, it is possible to select more than one but it only takes into account the last value selected
-
although I think the following line is correct, the result is written without spaces either at the beginning or at the end.
reviewSelect.innerText = ` ${reviewContent} `
Even trying with a console.log of reviewContent gives the following result:
<span id="rating-here"> 5 </span>
But the number is put all together without spaces. I just can't understand why.
Any advice is welcome :)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @bbsmoothdev
My suggestion would be to use a radio button grouping in the HTML instead adding click events to
span
s, which is not keyboard accessible. You can use CSS to make "cover the radio buttons with the circles.
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