add example scripts for comments and loop

This commit is contained in:
Lukáš Hozda
2017-10-28 17:44:05 +02:00
parent 347191505d
commit 780962fcea
2 changed files with 18 additions and 0 deletions

8
scripts/loop.rhai Normal file
View File

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