TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
range.js – JavaScript's missing range function.
2 点
作者
js-coder
超过 12 年前
1 comment
thirit
超过 12 年前
well, why not simply:<p>Number.prototype.to = function(to){r=[]; for(var i=this+0; i<=to; i++){ r.push(i)} return r;}<p>1..to(5) //[1,2,3,4,5]