# Conditionals Numbat has `if-then-else` conditional expressions with the following syntax ``` nbt if then else ``` where `` is a condition that evaluates to a Boolean value, like `3 ft < 3 m`. The types of `` and `` need to match. For example, you can defined a simple step function using ```nbt fn step(x: Scalar) -> Scalar = if x < 0 then 0 else 1 ```