Written by the Fiveable Content Team • Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 exam•Written by the Fiveable Content Team • Last updated September 2025
Definition
The loop statement "while" repeatedly executes a block of code as long as a specified condition is true. It keeps looping until the condition becomes false.
Related terms
loop: A programming construct that repeats a specific block of code until a certain condition is met.