Sorts an array.
Uint8Array.sort method | globals module | Bun BuildDocsReferenceGuidesBlogDiscord/Globals/Uint8Array/sortMsort BuildDocsReferenceGuidesBlogDiscord /Globals/Uint8Array/sortMsort @param compareFn
Search the reference...
/
method
Uint8Array.sortsort(compareFn?: (a: number, b: number) => number): this;Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they're equal and a positive value otherwise. If omitted, the elements are sorted in ascending order.
[11,2,22,1].sort((a, b) => a - b)
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →Uint8Array.sort method | globals module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- API documentation for method globals.Uint8Array.sort | Bun