不小心发现bug二枚,sort()方法
来源:6-4 关联字符串-代码演示

_玲
2019-03-08
The sort() method sorts the elements of an array in place and returns the array. The default sort order is built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.
var array1 = [1, 30, 4, 21, 100000];
array1.sort();
console.log(array1);
// expected output: Array [1, 100000, 21, 30, 4]
幸运的老师,没有十位数以上的。
写回答
1回答
-
快乐动起来呀
2019-03-08
嗯嗯,这个是要注意的,你怎么不回复我要不要换工作哈哈
122019-10-03
相似问题