Basic JavaScript - Use Recursion to Create a Range of Numbers - wsq8j_S2dz0DyuuNCX7yD

Tell us what’s happening:
Describe your issue in detail here.

**Your code so far**
function rangeOfNumbers(startNum, endNum) {
function rangeOfNumbers(startNum, endNum) {
if (startNum - endNum == 0) {
return [startNum]
} else if (startNum <= endNum) {
var numbers = rangeOfNumbers(startNum, endNum -1);
numbers.push(endNum);
return numbers;

}
}

console.log(rangeOfNumbers(1, 5))
**Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Use Recursion to Create a Range of Numbers

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.


It looks like you copy-pasted the solution instead of your function incorrectly.

I have been on this lesson for several days. I cannot find a solution.

Even solutions that I found online do not solve it. I need to move on. Please help.

If you only want to copy an answer, I would just skip this challenge and come back to it later when you have better skills.

I did not realize skipping it was an option. But it is the last exercise in that group so I guess I can skip it.