1.数组排序
arr.sort();
2.对象数组排序
arr.sort(function(a,b){
return a[item]-b[item];
})
3.关于元素是字符串的
return a[item]>b[item]?1:-1;