Skip to content

Commit

Permalink
docs(language-definition.md) - add reverse function
Browse files Browse the repository at this point in the history
  • Loading branch information
PxyUp committed Feb 9, 2024
1 parent e1ca2d5 commit 3fb6f2f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/language-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,15 @@ Returns the first `n` elements from an array. If the array has fewer than `n` el
take([1, 2, 3, 4], 2) == [1, 2]
```

### reverse(array) {#reverse}

Return new reversed copy of the array.

```expr
reverse([3, 1, 4]) == [4, 1, 3]
reverse(reverse([3, 1, 4])) == [3, 1, 4]
```

### sort(array[, order]) {#sort}

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

0 comments on commit 3fb6f2f

Please sign in to comment.