Skip to content

Commit

Permalink
update(JS): web/javascript/reference/global_objects/array/sort
Browse files Browse the repository at this point in the history
  • Loading branch information
undead404 authored and AdriandeCita committed Sep 14, 2022
1 parent 722cb8e commit f609da0
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,18 @@ browser-compat: javascript.builtins.Array.sort

## Синтаксис

```js
```js-nolint
// Без функції порівняння
sort();
sort()
// Стрілкова функція
sort((a, b) => {
/**/
});
sort((a, b) => { /* … */ } )
// Функція порівняння
sort(compareFn);
sort(compareFn)
// Функція порівняння, оголошена на місці
sort(function compareFn(a, b) {
/**/
});
sort(function compareFn(a, b) { /* … */ })
```

### Параметри
Expand Down

0 comments on commit f609da0

Please sign in to comment.