ArrayParser.sort() - Mtax-Development/GML-OOP GitHub Wiki

Argument

Name
Type
Optional
order
No

Returns

Not applicable.

Description

Sort the values in the array in the specified order. The order can be specified as {bool} for ascending order or as a sorting {function}. If ordering is specified as {bool}, the sorting will work properly only when all array values are either numbers or strings. If ordering is specified as a {function}, it has to accept two arguments, which are to be used to comapre every element of the array with each other in pairs, then return a number, which is 0 for equality and negative or positive value for such respective comparison result.

⚠️ **GitHub.com Fallback** ⚠️