> For the complete documentation index, see [llms.txt](https://smllang.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smllang.gitbook.io/home/basics/conditionals.md).

# Conditionals

Branching on that condition.

Conditionals are very useful because they allow use to execute different instructions based on a boolean condition. Conditionals can also be nested to create complex instructions and branches.&#x20;

{% code lineNumbers="true" %}

```sml
if 10 > 2 then true else false
if null? then println("Is null") else println("Not null :)")
```

{% endcode %}
