Sorts the items in a list.
<list>
or
element.name.sort(ascending, alphabetic)Name | Type | Description |
---|---|---|
ascending | boolean | Optional. True for ascending order, false for descending order. |
alphabetic | boolean | Optional. True for alphabetic sorting, false for numeric sorting. |
The following sorts a list alphabetically in ascending order:
<trial example>
/ ontrialend = [list.names.sort();]
</trial>
The following sorts a list numerically in ascending order:
<trial example>
/ ontrialend = [list.scores.sort(true, false);]
</trial>
The following sorts a list numerically in descending order:
<trial example>
/ ontrialend = [list.topscores.sort(false, false);]
</trial>