Ternary Logic (If-Return)
The Ternary block is a compact way to make a decision and return a value based on that decision. It works like an inline if-else statement.
Test - Use If True - Use If False
This block takes three inputs:
- if: A condition to test (must return true/false).
- then: The value to return if the condition is true.
- else: The value to return if the condition is false.
Example
Setting a variable status_text based on a boolean is_ready:
- If
is_readyis true, setstatus_textto "Ready!". - If
is_readyis false, setstatus_textto "Loading...".