# Conditionals

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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smllang.gitbook.io/home/basics/conditionals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
