wscript: functions & control flow
Block-valued fn bodies, closures, if/for/while/loop; ranges are exclusive (0..10) or inclusive (0..=10).
rust
// blocks evaluate to last expression
// omitted return type = unit
let double =
if cond else
for i in 0..10 // exclusive; 0..=10 inclusive
for x in // list elements (also map keys, string chars)
while cond
loop
A function with no return type must not end on a non-unit expression — bind unused Results (let _ = vm.mouse_click("left")) or add ; to discard.