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?

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy