Grouping expressions group other sub-expressions using [ and ] like other languages typically use parentheses. This allows for example arithmetic expressions to specify order of operations beyond the standard execution order of operators.
Operator Name | Symbol | Function |
---|---|---|
Left Square Bracket | [ | Begin a grouping expression. |
Left Square Bracket | ] | End a grouping expression. |
Any expression can be grouped together using [ and ]. For example, arithmetic expressions can be grouped together for complete clarity in order of operations.
Or more complex expressions can be grouped together to ensure a proper order or execution of each part of the overall expression, such as with logical and comparison operators.