Add Rhai book.
This commit is contained in:
15
doc/src/language/loop.md
Normal file
15
doc/src/language/loop.md
Normal file
@@ -0,0 +1,15 @@
|
||||
Infinite `loop`
|
||||
===============
|
||||
|
||||
{{#include ../links.md}}
|
||||
|
||||
```rust
|
||||
let x = 10;
|
||||
|
||||
loop {
|
||||
x = x - 1;
|
||||
if x > 5 { continue; } // skip to the next iteration
|
||||
print(x);
|
||||
if x == 0 { break; } // break out of loop
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user