DEV Community

Discussion on: What is a JavaScript Recursive Function? 🔁

Collapse
 
marzelin profile image
Marc Ziel

Plot twist: recursion is just a loop in disguise.

Any recursive function can be represented as a loop and vice versa.

Collapse
 
therceman profile image
Anton

Yes :) I couldn't find an example where the desired task can be completed only using recursion and nothing else