js排序

function sortFunc(a,b){

     a-b;

}

var  arr1 = [11,6,3,2];

arr1.sort(sortFunc);

原文地址:https://www.cnblogs.com/sunfenqing/p/7308078.html