rhai/scripts/if2.rhai

11 lines
141 B
Plaintext
Raw Normal View History

2021-06-07 14:15:06 +02:00
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}`);