[undefined × 1, 1, 2, 3, 4, 5, 6, 7, 8, 9]
var range1 = function (a,b){
var c = [];
var l = 1;
for (var i=a; i<b; i++) {
for (var d=0; d<l; d++); {
c[d] = i;
}
l= l+1;
}
return c;
}
console.log(range1(1,10));
function range(a,b) {
var c = new Array(Math.abs(a - b));
for (var i = a; i <= b; i++) {
c[i-a] = i;
}
return c;
}