我有一个字符串类型的整数数组。
var a = ['200','1','40','0','3'];
输出
>>> var a = ['200','1','40','0','3'];
console.log(a.sort());
["0", "1", "200", "3", "40"]
我还将有一个混合类型的数组。例如
var c = ['200','1','40','apple','orange'];
输出
>>> var c = ['200','1','40','apple','orange']; console.log(c.sort());
["1", "200", "40", "apple", "orange"]
====================================================
字符串类型的整数未排序。