> For the complete documentation index, see [llms.txt](https://iot.datalit.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://iot.datalit.de/1-getting-started/concepts-in-programming/control-structures.md).

# Control Structures

## Goals

{% hint style="success" %}
You know how you can control the execution flow of your program
{% endhint %}

## If-Then-Else

```javascript
if (numberDevices > 0) {
        log("Great work! I found >" + newDevices.length + "< devices!")
    }
    else {
        log("Uggh, something went wrong. I didn't detect any devices!");
    }
```

## Switch-Case

{% hint style="info" %}
Coming soon.
{% endhint %}
