This is a simple demo on how for loops and recursive loops behave. I'm not going to say much and let you figure it out. Try some bigger numbers and find the "sweet spot".
Use the following link to see the page in action: https://htmlpreview.github.io/?https://github.com/cniesen/for-vs-recursive-loops/blob/master/for-vs-recursive-loops.html