DEV Community

loading...

Day 49 of #100dayofcode

devggaurav profile image Gaurav ・1 min read

Day 49 of #100DaysOfCode
(Also Day 2 of 'Diwali ki Saaf-safai' 😂)
Watched and coded the last exercise from #javascript30, the whack a mole game. When u press 'play' an image of 'mole' pops up from a random hole and u get a point every time u click the mole.
But there was a bug that if we click the play button multiple times, the mole pops up from multiple holes simultaneously. fixed it using the 'once' for the event listener. But now u have to refresh the webpage every time u finish a game of 10s. 😅😅

Alt Text

Discussion (0)

pic
Editor guide