The game of Snake in JavaScript