array.sort [method]

array.sort([ bool reverse ])

sorts the array using the sgs_Compare C API function for comparisons, returns the array for chaining

a = [ 6, 8, 7, 5 ];
a.sort(); // a = [5,6,7,8]