📜  js 对数字进行降序排序 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:11.245000             🧑  作者: Mango

代码示例3
var numArray = [140000, 32, 12, 63323, 104, 99];

numArray.sort(function(a, b) {
  return b - a;
});

// Array(6) [ 140000, 63323, 104, 99, 32, 12 ]