3 ms·
if/else doesn't have to be a statement: max = if a < b then b else a You may also like `jq` syntax with `elif`s: if cond1 then res1 elif cond2 then r
by st1ck 6y ago
if/else doesn't have to be a statement:
max = if a < b then b else a
You may also like `jq` syntax with `elif`s:
if cond1 then res1 elif cond2 then res2 ... else res end