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.

UsageReturns
List.sort(keys)List
ArgumentTypeDetails
this: listListThe list to sort.
keysList, default: nullOptional keys to sort by. If 'keys' is provided, it must have the same length as 'list'.