Tell us what’s happening:
Finishing up the last few problems on the Basics of JS coarse. I believe that my code is working correctly to pass the challenge yet is saying that my results are not correct. Any ideas why this is not working? Thanks
The tests are correct, your code is not working properly. One thing you can do is install node on your computer which will allow you to run your JS code locally at the terminal and then you can test for yourself whether your code is working.
Also, I would recommend you start by handling the base case first (in the if) and then add the recursion in the else. This is not required but it seems to make things a little clearer. So for the if, when are you going to stop making recursive calls and what are you going to return when that happens?