Very nice. I also see you got a few other tricks that I missed, like factoring out the random number generator. I am impressed.
Edit: oh, and please consider it a pull request. :)
Thanks, biot, you are officially awesome!
One thing I noticed is that you're setting the timeout value to 350-s.length*5. As the grid is 16x16, the maximum snake length will be 256. Multiplying the length by 5 will soon make the game humanly unplayable somewhere around a length of 60.