Iterative Loops: Glossary
Iterative Loops: Glossary
Counter: A number or numeric variable, usually used with a for loop to keep track of the iteration number.
Do-while loop: A while loop that always runs once before testing its run condition. This loop is best for operations that should be performed at least once—no matter if the condition evaluates to false.
For-each loop: A for loop, in the syntax of most programming languages, that simplifies the code needed to run specifically through all the elements in a list. All the counting and indexing of elements is done behind-the-scenes of this kind of loop because this use of a for loop is so common.
For loop: A loop that usually runs a predetermined number of times.
Iterative loop: A loop that gets its power from iteration, or repetition of instructions with slight changes.
Nested loop: A loop situated inside a loop. The more loops nested inside each other a piece of code has, the longer it takes to run.
Recursive loop: A loop that gets its power from calling itself to solve the problem.
Time complexity: How long it takes a program to run relative to input size. Since actual time is trivial for most computer programs, the only real issues arise when the code has large exponents in its runtime and giant data sets to run through.
While loop: A loop that usually runs until its run condition is no longer true