function px(a,b){
return a-b
}
if (/^bai\d/.test(a) ^ /^\D/.test(b))
return a>b?1:(a==b?0:-1);
return a>b?-1:(a==b?0:1);
var arrdemo = [4,6,788,55,1,2,2,3,4,4,4];
var ss = new Set(arrdemo)
var sum = Array.from(ss)
sum.sort(px)
原文:https://www.cnblogs.com/onceweb/p/13278866.html