DEV Community

loading...

Discussion on: Learn Javascript through a Game

Collapse
mohessaid profile image
Mohammed E. MEZERREG

Great article! I think you have to mention that the interval variable is a global variable as well. Also mention that clearInterval(interval) must be added to the existing if statement in the update function when the snake dies.

Forem Open with the Forem app