-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScriptGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
Bug Report
π Search Terms
Float64Array TypedArray Float32Array documentation sort ascii typescript
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about documentation
β― Playground Link
Playground link with relevant code
π» Code
new Float64Array([1000, 1, 2]).sort()
// documentation on Float64Array.sort(): If [compareFn is] omitted, the elements are sorted in ascending, ASCII character order.
// expected as per docs
// [1, 1000, 2]
// actual
// [1, 2, 1000]
π Actual behavior
The code behaves differently than the documentation states it. The elements are sorted numerically and not by ASCII character order.
π Expected behavior
I expected the documentation to match with the actual behavior.
nmain
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScriptGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this