In this article I will build a simple snake game in JavaScript from scratch. The player can control the snake by keyboard. Whenever the snake collides with food(a red circle), it gets 1 point and food moves to a random position.
You can view the finished application here. The requirements for this application are basic knowledge of html, JavaScript and some prior knowledge of html canvas.