rhai/scripts/if1.rhai
2020-03-16 14:50:12 +08:00

14 lines
241 B
Plaintext

let a = 42;
let b = 123;
let x = 999;
if a > b {
print("a > b");
} else if a < b {
print("a < b");
let x = 0; // this 'x' shadows the global 'x'
print(x); // should print 0
} else {
print("a == b");
}