import { YoutubeEmbed } from '../../../src/js/YoutubeEmbed.jsx'

# Condition

The Condition block allows you to split your flow in two based on a condition.

<img src="/img/blocks/condition.png" width="500" alt="Set variable" />

☝️ This can be translated to: "If 'Score' is greater than 20 then go to this path. Otherwise, go to the other path.".

A condition can contain different comparisons that are evaluated in order and linked with a logical operator: 'AND' or 'OR'.

## 3 minutes video overview

<YoutubeEmbed videoId="47KyLHzdpnY" />

## Advanced

For more complex use cases you can stack conditions on top of each other:

<img src="/img/blocks/condition-2.png" width="500" alt="Set variable" />

☝️ This can be translated to: "If 'Age' is greater than 50 then go to this path. Else, if 'Age' is greater than 20 then go to this path. Otherwise, got to the other path".
