if can be used as an expression, which lines up with the behavior of the ternary operator in other languages. See If.
if