If Block
If block executes blocks under “True” only if certain condition is met otherwise blocks under “False” are executed.
# How to create an if block
- Drag "If" block under “Control Blocks” in block picker.
- Enter a condition. You dont have to use double curly braces while entering variable in condition input. You can use following comparators to compare two values:
- ==: equal to
- {">="}: greater than or equal to
- {"<="}: less than or equal to
- {"!="}: not equal to
- You can test multiple conditions at once by using “and” and “or” between the conditions
- Eg: Condtion1 and condition2. This will execute only if condition1 and condition2 both are true.
- Eg: Condtion1 or condition2. This will execute if either condition1 or condition2 are true.
- You can group conditions using brackets eg: {"(condtion1)"} and {"(condtion2)"}