Skip to content

docs: sort example numbers numerically - #200

Open
dajiaohuang wants to merge 1 commit into
alewin:masterfrom
dajiaohuang:docs/fix-numeric-sort-example
Open

dajiaohuang wants to merge 1 commit into
alewin:masterfrom
dajiaohuang:docs/fix-numeric-sort-example

Conversation

@dajiaohuang

Copy link
Copy Markdown

The README example says it sorts numbers, but Array.prototype.sort() without a comparator orders numeric values lexicographically (for example, [1, 10, 2]). Use a numeric ascending comparator so the example matches its stated purpose.\n\nValidation: git diff --check passed. Documentation-only; no project tests required.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant