...

/

Recursion vs. Iteration

Recursion vs. Iteration

This lesson will teach you the differences between recursion and iteration.

What is iteration?

Iterative code is a block of code that runs in a loop. In other words, the same code is repeated over and over again. The idea seems much similar to that of recursion. So where does the difference lie?

Is there a difference?

Within recursion and iteration, there are multiple differences. These differences give these two implementations of repeated code their own uses.

  • The first difference to note is that ...