shortest-js-snake icon indicating copy to clipboard operation
shortest-js-snake copied to clipboard

HTML/JavaScript Snake game in only 348 Bytes or 32 readable lines of code

Snake As Short As I Can

Shortest Snake implementation I could do with HTML5 and ES6 while still respecting readability. This way my Snake source code is only 32 lines of HTML+JS code. Yet its a super simple version.

There is an even shorter minimalist version in shorter.html without HTML boilerplate => 22 LOC!

Then there is the hand-minified version in min.html. I tried to squeeze out as much bytes as I could => 348 Bytes only