<<< The while loop | Index | While Statement Example >>> |
A while statement repeats a block of {statements} as long as the boolean expression in the statement yields true.
When the boolean expression becomes false the block is no longer executed; instead, the statements following the block are then executed
Any variable defined within a block is visible only within that block. This also means that the variable is no longer reachable after the thread of execution leaves the block
<<< The while loop | Index | While Statement Example >>> |