Skip to main content

$block

The $block operator executes a block of expressions and returns the value of the last expression.

Input

  • An array of expressions to execute in sequence

Output

  • The value of the last expression in the block, or null if the block is empty

Examples

Basic Block

Result: 15

Block with Early Return

Result: "negative" if the input_value is negative, otherwise "non-negative"