+ 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

18th Nov 2022, 12:48 AM
Pooja Sahoo
Pooja Sahoo - avatar
1 Odpowiedź
+ 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
18th Nov 2022, 6:50 AM
arturop200
arturop200 - avatar