Whack-A-Mole

Made from scratch with

How to Play

Click on Moles as they pop up and before they disappear!

Can you catch them all with 100% accuracy?

Dev Diary

Whack-A-Mole was made using HTML, CSS and vanilla JS. The goal of the project was to get familiar with manipulating DOM elements directly and listening for and executing on DOM events.


The game area is a table created with HTML then filled with rows of table data whose CSS included background pictures of grassy holes. Moles were randomly generated on a .5 second interval across the table. An event listener was attached to the table so that when a user clicked anywhere on that table, the DOM element that was clicked on was changed in some way. In our case, it removed a mole if one was currently present.

Wednesday, May 5, 2021

The single project page was updated to include the working tech stack. Game directions and brief description was also added.


Monday, April 26, 2021

Whack-A-Mole was added as a project to the site.