array.sort
Sorts the array in place: numbers by value, strings alphabetically. order = order.ascending (default) or order.descending; na elements go last.
array.sort(id: array<int/float>, order: string = "ascending")
array.sort(id: array<string>, order: string = "ascending")
Parameters
idarray<int/float>: An array of numbers or strings, sorted in place; na stops the script with a runtime error.orderstring: order.ascending (default) or order.descending; another text stops the script with a runtime error.
Example
a.sort(order.descending)