rhai/scripts/if2.rhai
2021-06-07 20:15:06 +08:00

11 lines
141 B
Plaintext

let a = 42;
let b = 123;
let x = if a <= b { // if-expression
b - a
} else {
a - b
} * 10;
print(`x should be 810: ${x}`);