Nifty! Thanks for a pure JavaScript example! I was wondering what could tiny games might be done with JS.
JS is quite good to write spaghetti code 8) Also you can use online tools to shrink your code, i don't like them because they remove all the fun but they are quite good.