js一维数组中数值排序

为什么80%的码农都做不了架构师?>>>   hot3.png

var a=[1,2,3,5];
alert(Math.max.apply(null, a));//最大值
alert(Math.min.apply(null, a));//最小值

转载于:https://my.oschina.net/lccchn/blog/1601030

你可能感兴趣的:(js一维数组中数值排序)