数组按顺序排列

let getdata = [40,100,1,5,25,10];
getdata.sort(function(a,b){return b-a});
posted @ 2021-04-01 11:08  白_小白  阅读(95)  评论(0)    收藏  举报