sort => arr.sort((a,b)=> (b-a))
var arr=[1231,123,34,30,1111,-1]
function s_a(arr){
arr.sort((a,b)=> (b-a))
}
console.log(s_a(arr));
sort => arr.sort((a,b)=> (b-a))
var arr=[1231,123,34,30,1111,-1]
function s_a(arr){
arr.sort((a,b)=> (b-a))
}
console.log(s_a(arr));
本文标题:排序篇-2020-01-03
本文链接:https://www.haomeiwen.com/subject/ygmaoctx.html
网友评论