Britannica AI Icon

iteration

programming
Also known as: looping

Quick Summary

In programming, iteration refers to the repetition of a sequence of steps. This is a fundamental control structure that allows computers to solve complex problems by repeating simple instructions as needed.1

Iteration is distinct from recursion, which is a technique where a function calls itself until a specific condition is met. While both achieve repetition, iteration typically involves loops, whereas recursion breaks a problem into smaller, self-similar subproblems. Iteration is a core concept for expressing algorithms and organizing information within computer programs.21

Summary created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

Ask Britannica AI about this topic

Britannica doesn't have a full article on this topic, so we've curated a list of our relevant coverage.