rhai/scripts/loop.rhai

9 lines
106 B
Plaintext
Raw Normal View History

let x = 10;
// simulate do..while using loop
loop {
print(x);
x = x - 1;
if x <= 0 { break; }
}