Why this is showing wrong answer

Tell us what’s happening:

Your code so far

function rangeOfNumbers(startNum, endNum) {
return [endNum];
return [startNum].concat(rangeOfNumbers(startNum+1,endNum));

Hi @kpradeep, I think your code should work, have you tried refreshing the page and submitting again?

Sometimes it does the trick :slight_smile:
Hope it helps.

Hey @kpradeep. @Marmiz says that your code is correct. Then there might be too possibilities for your code not passing the tests:

  • Maybe this is a bug with FCC
  • Sometimes browser extensions and ad blockers clash with FCC’s challenges. Try disabling your browser extensions. This worked for some users

Don’t forget to post whether the problem is solved or not. Happy Coding!