hhfa1990
2/5/2015 - 6:23 PM

get the max and me min number from array

get the max and me min number from array

var array = [5, 10, 15, 3, 1, 14];
var maxNum = Math.max.apply(Math, array); //15
var maxNum = Math.min.apply(Math, array); // 1