Tell us what’s happening:
**Your code so far**
function rangeOfNumbers(startNum, endNum) {
const arr=[];
arr.push(startNum);
if(startNum==endNum)
return arr;
return rangeOfNumbers(startNum+1,endNum);
};
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
.
Challenge: Use Recursion to Create a Range of Numbers
Link to the challenge:
ILM
2
Hello there.
Do you have a question?
If so, please edit your post to include it in the Tell us what’s happening section.
The more information you give us, the more likely we are to be able to help.
1 Like
Please tell errors in my code and why it is not executing
ILM
5
it is executing, but have you checked what’s the output?
like, try console.log(rangeOfNumbers(3,6))
, what does it return?
system
Closed
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.