Skip to content

Commit

Permalink
chore: update docs regarding sortFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
liz3 committed Jan 22, 2024
1 parent dc0f78a commit 0d3327d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/docs/collections/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ print(list1); // [-1, 1, 2, 3, 4, 5, 10]

#### list.sortFunc(Func)

Sorts a list with a Custom Callback
Sorts a list with a Custom Callback, The callback function passed to `.sortFunc` takes two elements of the list `a` and `b`.
The return value should be a number whose sign indicates the relative order of the two elements: negative if `a` is less than `b`, positive if `a` is greater than `b`, and zero if they are equal.

```cs
var list1 = [[1, "Dictu"], [-1, "SomeValue"], [5, "!"], [4, "Awesome"], [2, "is"]];
Expand Down

0 comments on commit 0d3327d

Please sign in to comment.