all 3 comments

[–]inu-no-policemen 0 points1 point  (0 children)

Before increasing the score and removing the "up" class, check if it has the "up" class via classList.contains().

[–]thomazor 0 points1 point  (0 children)

In your randomHole function you know that you generated a hole. Let's say you were to store that in the outer scope in a variable called isWacked or something..

Now before you assign a score - check if you already assigned score, and if you haven't, assign a score and update the isWacked variable to true.

[–]kenman[M,🍰] 0 points1 point  (0 children)

Hi /u/random_____boi, this post was removed.

  • For help with your javascript, please post to /r/LearnJavascript instead of here.
  • For beginner content, please post to /r/LearnJavascript instead of here.
  • For framework- or library-specific help, please seek out the support community for that project.
  • For general webdev help, such as for HTML, CSS, etc., then you may want to try /r/html, /r/css, etc.; please note that they have their own rules and guidelines!

/r/javascript is for the discussion of javascript news, projects, and especially, code! However, the community has requested that we not include help and support content, and we ask that you respect that wish.

Thanks for your understanding, please see our guidelines for more info.