✅ How call stacks work in recursive calls
Hello guys, I've implemented a small funtion to find any nth term in the fibonnaci sequence.
I don't understand how the recursive calls work under the hood though. Like, I know that num-1 is called first, then when all its call stack is kind of "over" we move to the right hand side but this is still vague. I was wondering if there was kind of a visualization tool to see what's hapenning and what's being return for each call.
6 Replies
visual studio and step through the code. look in locals and call stack window. locals will also show when functions return values

oh ok, we can use the debugger to view the stack call?
yes
I will have a look, thanks !!
$close
If you have no further questions, please use /close to mark the forum thread as answered