Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# whileloop

A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition.
The while loop can be thought of as a repeating if statement.

The while construct consists of a block of code and a condition/expression.
The condition/expression is evaluated, and if the condition/expression is true, the code within the block is executed.
This repeats until the condition/expression becomes false.
Because the while loop checks the condition/expression before the block is executed, the control structure is often also known as a pre-test loop.
Compare this with the do while loop, which tests the condition/expression after the loop has executed.