Skip to content

Commit a47295b

Browse files
authored
Update index-FINISHED.html
I found that if you don't call the parentNode the value of this point to the mole and the class was added to the hole. BTW, the remove class didn't worked.
1 parent 2bc30a0 commit a47295b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

30 - Whack A Mole/index-FINISHED.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h1>Whack-a-mole! <span class="score">0</span></h1>
7676
function bonk(e) {
7777
if(!e.isTrusted) return; // cheater!
7878
score++;
79-
this.classList.remove('up');
79+
this.parentNode.classList.remove('up');
8080
scoreBoard.textContent = score;
8181
}
8282

0 commit comments

Comments
 (0)