JS - 获取到一个a到b的number类型数组
function getNumberArr( a, b ) {
return Array.from(Array( b - a + 1 )).map(( e, i ) => a + i);
}
console.log(getNumberArr(1,20));
function getNumberArr( a, b ) {
return Array.from(Array( b - a + 1 )).map(( e, i ) => a + i);
}
console.log(getNumberArr(1,20));