Neat Javascript Game

https://codepen.io/hopefulcodegirl/pen/vYXOxQG?editors=1010

I am almost done with this JS Game but I am having an error in the game where once I am hit by an enemy, the game does not end, it jut starts over. What is wrong?

Starting around underneath line 183…?

The error I’m getting is AnimationId is not defined

That is because you never defined a variable named AnimationId.

2 Likes

It’s supposed to be defines on line 152 right?

Haha whoops! It’s all good now. Thank you!