@DavidMorgade
Posted
Hello Gloryjaw, congratulations on finishing the challenge! as a first Javascript project you did a pretty good job!
The only little problem that I find with your App is that you can still submit the ratings even when no rating is selected, you can fix this by adding a condition in your function that checks if a rating was selected, try something like this (not tested):
submit.addEventListener('click', function () {
if(rating === 0) return alert('Select a rating before submitting!')
thankyoustate.style.display = "block"
ratingstate.style.display = "none"
variablerating.innerText = `You selected ${rating} out of 5`
})
This will display a simple alert popup if no rating was selected! and will stop the function from working.
Hope my feedback helps you! if you have any question or if this doesn't work in your code, don't hesitate to ask, good job!
Marked as helpful
@Gloryjaw
Posted
@DavidMorgade Thank you, I have updated my solution.