range.js – JavaScript's missing range function. Posted by js-coder on Thursday December 20, 2012 @09:08AM from the github.com dept. https://github.com/js-coder/range.js ( 1 comment | 2 points | on HN )
Number.prototype.to = function(to){r=[]; for(var i=this+0; i<=to; i++){ r.push(i)} return r;}
1..to(5) //[1,2,3,4,5]