Iteration

When a process or sequence in a computer program is repeated, this is an iteration. In a computer program, a common form of iterations is a loop, which repeats code to determine values for multiple variables or sometimes just a single variable (adding up multiple values together).

Many computer programs and programming languages use iterations to perform specific tasks, solve problems, and present solutions. Websites may also include iterations in their client-side or server-side scripting. An example of an iteration in programming is a JavaScript function that determines the number of days, excluding weekends, between two dates. To do this the function checks each day, one at a time, to determine if the day is a weekday or falls on a weekend and loops through function until it has checked every day and calculates a final value.

Also see: Loop, Programming terms