📅  最后修改于: 2022-03-11 15:03:19.503000             🧑  作者: Mango
function sort() {
var ary = [2, 1, 0.4, 2, 0.4, 0.2, 1.5, 1, 1.1, 1.3, 1.2, 0.2, 0.4, 0.9];
return ary.sort(function(a, b) {
console.log(a,b,'rererererer')
return a - b;
});
}
alert(sort());