Tell us what’s happening:
Describe your issue in detail here.
I can’t understand how countUp function works here and
why it returns [1,2,3,4,5] not [5,4,3,2,1] ??
Yes, recursion is very confusing at first. There are many, many, many threads discussing recursion and many, many that deal with this exact functions, and many of those have detailed explanations. Rather than retype those 20 pages of explanation, I might recommend search back through previous threads and checking those out. I’m sure there is even a youtube video or two.
If, after that, you still have questions, please check back.