操作数组
//获取数组最大值
var arr = [12, 5, 41, 14, 65, 11, 32];
var count = Math.max.apply(this, arr);
console.log(count);//65
//排序
var arr = [12, 5, 41, 14, 65, 11, 32];
arr.sort(function(a,b){
//return a-b;//升序
return b-a;//降序
});
//数组颠倒过来
var arr = [12, 5, 41, 14, 65, 11, 32];
arr.reverse();//arr:32,11,65,14,41,5,12