# ee.List.sort

Sorts the list into ascending order. If the 'keys' argument is provided, then it is sorted first, and the elements of 'list' are placed in the same order.

<br />

| Usage | Returns |
|---|---|
| `List.sort(*keys*)` | List |

| Argument | Type | Details |
|---|---|---|
| this: `list` | List | The list to sort. |
| `keys` | List, default: null | Optional keys to sort by. If 'keys' is provided, it must have the same length as 'list'. |