function rangeOfNumbers(startNum, endNum) {
return [startNum];
};

I am trying to figure out how to do this recursion. It is the problem https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers. We have defined a function named rangeOfNumbers with two parameters. The function should return an array of integers which begins with a number represented by the startNum parameter and ends with a number represented by the endNum parameter. The starting number will always be less than or equal to the ending number. Your function must use recursion by calling itself and not use loops of any kind. It should also work for cases where both startNum and endNum are the same.

I did this one a couple days ago.
Recursion is really hard to wrap your mind around conceptually, but having a basic understanding of what’s going on is essential to being able to use recursion. I’d recommend reading this article to get a better understanding of what recursion is and how it works. Then, go back and read the example code they give you for count up (in the Use Recursion to Create a Countdown lesson) Read it again. Try to figure out what is going on in each step and write it down on a piece of paper if that helps you visualize it. Make sure you finish and understand that lesson before you go on to this one that you’re stuck on, because the solution to this one looks similar to the last one.
Hey, if you can pass this challenge (and you’ve already done all the previous ones) you’ve made it through Basic JavaScript!! Keep it up

For one you are not making a recursive call (calling the function within the function).

You have defined your based condition to be when startNum is greater than endNum. That will only happen if you at some point make a call to rangeOfNumbers that satisfies that condition. How will you adjust either startNum or endNum in the function call to accomplish that?