Design comparison
Solution retrospective
Which areas of your code are you unsure of?
- I'm unsure of how i build my javascript for me it can be better code. but this code work for me and also I'm struggling on my logic of how I'm gonna apply a submit rate(1-5) but overall working. I wish I'll add some warning state when there's no number input but I don't really know where to start and my javasscript are only limited. but overall feel so good in the end.
Feel Free to leave suggestion!.
Community feedback
- @Aik-202Posted about 2 years ago
Hi Co, Nice work!!!!. But I have some suggestions. For the JavaScript,
- From the cards, it's already obviously that the user is only suppose to choose from 1 to 5, so there's no need testing for that. Rather it should be something like this.
if (!rateNum) //that is rateNum is undefined { //error message } else { //submit rating }
This way you get to provide a check for when the user does not enter any input.
For the html
-
Try changing that h2 heading to h1, it will solve ya accessibility issue as there must be an h1 heading in your html...
-
Add alt to all your images, you can see why here
-
I feel like the link google.com wrapped around the star image is not necessary. What were you trying to achieve with that?π€π€π€
-
You can remove the link embedding the submit button, as it's not serving any purpose there.
Hope, this helps.
Marked as helpful0 - From the cards, it's already obviously that the user is only suppose to choose from 1 to 5, so there's no need testing for that. Rather it should be something like this.
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