pxt-core-own
Version:
Microsoft MakeCode, also known as Programming Experience Toolkit (PXT), provides Blocks / JavaScript tools and editors
15 lines (10 loc) • 354 B
Markdown
# 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