内部 JavaScript 排序方法对数字数据进行排序 - True 还是 False?
最佳答案
If compareFunction is not supplied, elements are sorted by converting them to strings and comparing strings in lexicographic ("dictionary" or "telephone book," not numerical) order. For example, "80" comes before "9" in lexicographic order, but in a numeric sort 9 comes before 80.
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/sort
所以答案是错误的。
关于JavaScript - JavaScript 内部排序方法对数字数据进行排序 - True 还是 False?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7232154/