Recursion to generate range of numbers
function rangeOfNumbers(startNum, endNum) {
const intArray = [];
if(startNum <= endNum ) {
const intArray = rangeOfNumbers(startNum, endNum-1);
intArray.push(endNum);
if(startNum > endNum) {
return;
}
return intArray;
} else {
return intArray;
}
};