The sort()
method of TypedArray
instances sorts the elements of a typed array in place and returns the reference to the same typed array, now sorted. This method has the same algorithm as Array.prototype.sort()
, except that it sorts the values numerically instead of as strings by default.