Tell us what’s happening:
i’m facing difficulties with my code please tell me whats wrong
Your code so far
function rangeOfNumbers(startNum, endNum) {
if (startNum <= endNum) {
return [];
} else {
const arr = rangeOfNumbers(startNum - 1, endNum - 1);
return arr.push(startNum, endNum)
}
};
console.log(rangeOfNumbers(1, 5));
here’s the link to the task: