A good, old fashioned snake
The game
A Nokia-style snake game. Use your keyboard arrows to move the snake. Avoid the walls and do not eat yourself. Grab the food to grow your snake. Bonus food will bring you more growth if you catch it before it fades away.
Code
A game to practice vanilla Javascript.
Game class contains most of the game high-level logic. It uses the Snake, Food and Bonus classes contained in snake.js.
The config.js file allows you to play with (some) configuration variables to customize the game.