# While

Repeat code while a [Boolean](/blocks/logic/boolean) `condition` is true.

```block
while(true) {
}
```

The while loop has a *condition* that evaluates to a [Boolean](/blocks/logic/boolean) value. 

The condition is tested before any code runs. Which means that if the condition is false,
the code inside the loop doesn't execute.

## #examples