Code Snake Game in Vanilla JavaScript (JS & HTML5 canvas)

Опубликовано: 25 Март 2026
на канале: AP CS Exam Prep
6,351
128

https://www.APCSExamPrep.com - Book a tutoring session here!

In this tutorial you will create a snake game using plain vanilla JavaScript. I will only use Sublime text editor and my browser. We will code a fully functional snake game with controls using arrow keys, lose the game if you hit the walls or your own tail, and every time you collect fruit you add to your score.

Learn to code:
Keyboard Controls
Canvas Drawing
Scoring
Arrays
Loops

https://github.com/codingclub12/Snake...

Hope you enjoy!