Skip to content

Commit 4aa225a

Browse files
authored
docs(language-definition.md) - add reverse function
1 parent 4fb3f65 commit 4aa225a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/language-definition.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,15 @@ Returns the first `n` elements from an array. If the array has fewer than `n` el
713713
take([1, 2, 3, 4], 2) == [1, 2]
714714
```
715715

716+
### reverse(array) {#reverse}
717+
718+
Return new reversed copy of the array.
719+
720+
```expr
721+
reverse([3, 1, 4]) == [4, 1, 3]
722+
reverse(reverse([3, 1, 4])) == [3, 1, 4]
723+
```
724+
716725
### sort(array[, order]) {#sort}
717726

718727
Sorts an array in ascending order. Optional `order` argument can be used to specify the order of sorting: `asc`

0 commit comments

Comments
 (0)