a game of Snake in Javascript