@enumerate
Return an array of [index, element] pairs.
Returns: array
Syntax
Section titled “Syntax”@enumerate(arr)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
arr |
array |
Source array |
Examples
Section titled “Examples”# Enumerate array elementsset $items ["a" "b" "c"]set $pairs @enumerate($items)