15 lines
200 B
JavaScript
Raw Normal View History

2022-07-24 23:03:35 +08:00
//! This script runs an infinite loop, ending it with a break statement.
2020-03-16 14:50:12 +08:00
let x = 10;
// simulate do..while using loop
loop {
print(x);
2020-03-16 14:50:12 +08:00
2020-05-25 20:14:31 +08:00
x -= 1;
2020-03-16 14:50:12 +08:00
2021-05-24 12:12:16 +08:00
if x <= 0 { break; }
}
2021-04-09 22:48:47 +08:00
export x as foo;