Design comparison
Solution retrospective
I could not display the selected number with JavaScript.
Community feedback
- @jgreen721Posted over 2 years ago
right now you are referencing 'links' which is an HTMLCollection (or basically an array) so you cant just cite a value as if its an object. You have it right with how you looped over the links and therefore are accessing each individual one but ya, you cant just do links.value (nor as you could links.click()). Maybe declare a global variable like (ie userRating=0) and update it each time that function fires. Right now looks like your only doing a console.log(). Then pass userRating into your displayText ( displayText.textContent = userRating).
Marked as helpful1@hamdi2008Posted over 2 years ago@jgreen721 Thank You, I will try to implement it.
1
Please log in to post a comment
Log in with GitHubJoin 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