📜  Javascript 数组排序 - Javascript 代码示例
📅  最后修改于: 2022-03-11 15:02:39.244000             🧑  作者: Mango
代码示例6
var numbers = [4, 2, 5, 1, 3];
numbers.sort(function(a, b) {
return a - b;
});
console.log(numbers);
// [1, 2, 3, 4, 5]