[–] thirit 13y ago ↗ well, why not simply: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]
1 comment
[ 8.2 ms ] story [ 30.3 ms ] threadNumber.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]