rhai/scripts/loop.rhai
2017-10-28 17:44:05 +02:00

9 lines
106 B
Plaintext

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