The challenge is to do the opposite which is countdown(num) and placing the numbers in countdown order instead. I passed by just changing push to unshift. Did I cheat? I don’t feel the most comfortable with recursion so I’m curious if there’s another way to do this that involves the recursive number rising to a ceiling limit rather than decreasing to a floor limit? (I hope that analogy made sense. )
but the function call will be countup(3) and will want [1,2,3], will be countup(6) and will want [1,2,3,4,5,6]
you can’t change the behaviour of the parameter like that. If the parameter is the max number, you can’t suddenly decide it is not.
Perhaps I still haven’t explained what I’m trying to say properly. What I’m trying to say is how to design the function so that we count up to a maxNumber. The function could be modified to pass a second parameter of a starting number and a max number, but that’s covered in the lesson following this one, so I don’t think that’s optimal. The issue is as ieahleen said: the maximum is being limited by the function itself, not by a parameter passed into the function.