<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [ATypedArrayTuple](./rc-js-util.atypedarraytuple.md) &gt; [sort](./rc-js-util.atypedarraytuple.sort.md)

## ATypedArrayTuple.sort() method

Sorts an array.

**Signature:**

```typescript
sort(_compareFn?: (a: number, b: number) => number): this;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

\_compareFn


</td><td>

(a: number, b: number) =&gt; number


</td><td>

_(Optional)_ The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.


</td></tr>
</tbody></table>
**Returns:**

this

