A little JavaScript program I made which gives insight into the "unravelling" nature of recursion.
I was doing assignments in the JavaScript section of FreeCodeCamp and I had to ponder the recursion stuff for quite awhile before sort of getting it. I went beyond the fCC interface and made my own little program to test in the JS Console terminal thingy in the browser (which kept disappearing but I figured out the idiosyncracy: Chrome's Developer Tools won't appear in a blank tab). Anyway when I added some console.logs, they confirmed my vision that the recursion process is similar to winding up a spool of thread until base case is reached, and then unravelling it. So I reflected this analogy into my program and figured I'd share on this here gitHub thingy in case it could become helpful.
Feed it a small number like 8 so you can see all of the results easily on a single page of the log. eg. functDemoRecursion(8);
Sean Luciw May 2 2023 I suppose the signature is superfluous. QED LOL