+ 1
All stars are colored when I click on any of the star...Why this error is occurred
Please help me to fix this error https://code.sololearn.com/WK8yk3omPsir/?ref=app
1 Answer
+ 4
forEach() iterates through all the elements, break cant be used.
Instead I used for of loop and added an if to stop it. also removed the h from mousehover since the event is mouseover.
https://code.sololearn.com/Wjs104xOaFQ8/?ref=app