Recursion is one of the most useful but very little understood programming technique. There are special kind of problems that can be solved very easy and elegant with a recursive function (e.g. locating a file in an hierarchical file system).
This article doesn't intend to offer an explanation of how recursion works ... but instead it offers you a PDF booklet with 8 classical problems implemented both using a recursive solution as well as an iterative solution.
As you'll see ... for some problems recursion comes more naturally, as for the others it should not be the first choice.
However just by replacing
console.log() you can run it in any environment you prefer.
The PDF booklet shows one way of implementing these problems. If you come up with a new solution, please send us a message on Twitter at @codeguppy... or leave a comment here.