Lists are sorted in alphanumeric order, with numbers being sorted before strings. Strings are sorted according to their initial letters, regardless of how many characters they contain. Sorted lists perform slightly faster than unsorted lists.
A linear list is sorted according to the values in the list. A property list is sorted according to the property names in the list or array.
After the values in a linear or property list are sorted, they will remain sorted, even as values are added to or removed from the lists.
Use the sort() method.
For example, the following statements sort a nonsorted alphabetical list:
-- Lingo syntax
oldList = ["d", "a", "c", "b"]
oldList.sort() -- results in ["a", "b", "c", "d"]
// JavaScript syntax
var oldList = list("d", "a", "c", "b");
oldList.sort(); // results in ["a", "b", "c", "d"]