how to check if an item is clicked or not in javascript
问题 I'm trying to develop a whack-a-mole web game with javascript, but i'm new to this and i would really appreciate some help. I wanna check if the mole is clicked or not, cause if it's not, I want the player to lose a life and also I want to make the start button only work once. This is the code so far: const holes = document.querySelectorAll('.hole'); const scoreBoard = document.querySelector('.score'); const moles = document.querySelectorAll('.mole'); let lastHole; let timeUp = false; let