Recursion
by Anonymous
Follow a function calling itself step by step, and see what happens when the stopping condition is missing.
About this app
Recursion is an interactive coding lesson that demonstrates how a function calls itself. Explore three activities: nested dolls for stopping conditions, stack-like number calculations that build results while returning, and branching trees that illustrate recursive drawing. Step through each challenge, adjust values, and reset the examples to see the call sequence and visual results change.
Use cases
- Beginners learning recursive functions
- Students practicing JavaScript and algorithm basics
- Teachers demonstrating base cases and call stacks
- Learners exploring recursive fractal-style drawings
Features
- Three tabs covering nested calls, value building, and branching trees
- Step-by-step Next and Reset controls
- Adjustable stopping conditions and starting numbers
- Additive and multiplicative recursion exercises
- Interactive tree depth and branch-angle challenges
- Visual call sequences, unfolded steps, code, and SVG tree previews