<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
var arr = [11, 7, 6, 55, 44, 33, 88, 45];
arr.sort(function(a, b) {
// return a - b; // 升序的顺序排列
return b - a; // 降序的顺序排列
});
console.log(arr);
</script>
</head>
<body>
</body>
</html>
11-27
6475
12-13
1万+
05-05
5161