function getNumberArr( a, b ) { return Array.from(Array( b - a + 1 )).map(( e, i ) => a + i); } console.log(getNumberArr(1,20));