📅  最后修改于: 2022-03-11 15:03:45.458000             🧑  作者: Mango
var arr = [10, 5, 40, 25, -3412, 4212, -107.578, 97.453];
function sortNumber(a, b) {
return a - b;
}
return arr.sort(sortNumber);