Translations:Extension:Scribunto/Lua reference manual/1753/en

Sorts table elements in a given order, in-place, from  to. If  is given, then it must be a function that receives two table elements, and returns true when the first is less than the second (so that   will be true after the sort). If  is not given, then the standard Lua operator   is used instead. This in turn means that the command  will crash on the spot if the table contains different data types that cannot be compared.