Ok so I was writing simple recursion problems to see how they work and the console output was not what I was expected, and I cant seem to understand the output actually, also I am aware I can use the debugger but I wasn't able to find any relevant source to the problem.
*The part I don't understand is the part where my code is starting to "return" after the number 0*
Well, first the message() function prints the times value it was passed. If times is more than zero, the recursion continues, in the form of another call to message, with times decreased by one.
Once times is no longer larger than zero (once it reaches zero), the recursion stops, and the inner-most recursion can terminate, which, in turn, allows the next recursion to terminate, etc.
The part I don't understand is why is returning from 0 to 3, I know the function would print out the "message 0 is returning" but after that message I don't get why it would go up to 3 again
Message 1 is returning
Message 2 is returning
Message 3 is returning