Use Recursion to Create a Range of Numbers 12

Hello guys please help with these challenge , it keeps stating “ReferenceError: rangeofNumbers is not defined” ?

   **Your code so far**

function rangeOfNumbers(startNum, endNum) {
if (endNum < startNum) {
return [];
} else {
  var countArray = rangeofNumbers(startNum, endNum - 1);
countArray.push(endNum);
return countArray;
}  
};
console.log(rangeOfNumbers(1, 9));
   **Your browser information:**

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

Challenge: Use Recursion to Create a Range of Numbers

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers

it’s not defined! remember that capitalization matters

1 Like

Thanks very much, it helped.