Snake in Javascript

This weekend I spent a few hours to write the classic game of Snake in javascript. There are already many versions of Snake available on the web. This was just some fun way to practice javascript. I used YUI 2 for event and dom handling. I have already written a few games in other languages like C++ and Basic during school/college days but this is my first game in Javascript. Will try to write better games in the future probably using HTML5 which can give a much better experience.

The game can be played at

The javascript code can be viewed at

3 thoughts on “Snake in Javascript

  1. very cool & good js snake game, thank you very much for sharing.

    Can you share this game on my JavaScript library?

    Awaiting your response. Thank

  2. […] looked at some examples that build a snake game in javascript and they seem to move the snake with this […]

  3. I’m glad they have started doing “real” studies on electronic cigarettes. The lack of all those tobacco toxins, alone, was enough for me to switch, but it is good to see more validation that e-cigs are better for you than tobacco ones.

Leave a Reply

Your email address will not be published. Required fields are marked *