whileloop

noun
UK /ˈwaɪl.luːp/
US /ˈwaɪl.luːp/

A while loop is a set of computer instructions that keeps repeating as long as a rule stays true.

The program uses a while loop to keep asking for a password until the right one is typed.


OTHER MEANINGS

2. A loop in a program that checks its condition before each round of work.

A while loop may run zero times if its condition is false at the start.

3. A repeating structure in code that ends when a test becomes false.

She replaced the while loop with a for loop to make the counting clearer.

4. A common source of bugs when its condition never becomes false.

The while loop ran forever because the counter was never increased.