Basic JavaScript - Use Recursion to Create a Range of Numbers

Tell us what’s happening:
I would like to know what’s wrong with my code

Your code so far

function rangeOfNumbers(startNum, endNum) {
  if (endNum < startNum){return []}
  const arr = rangeOfNumbers(starNum, endNum-1)
  arr.push(endNum)
  return arr
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15

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

Link to the challenge:

Pretty sure there should be a second t in there :slightly_smiling_face:

1 Like

:sweat_smile: :rofl: oh typo mistake, I think there is some problem with my code

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.