rhai/scripts/loop.rhai

9 lines
106 B
Plaintext
Raw Normal View History

2017-10-30 16:08:44 +01:00
let x = 10;
// simulate do..while using loop
loop {
print(x);
x = x - 1;
if x <= 0 { break; }
}