
Getting the maximum element of an array
Array.reduce()最佳方式Array.prototype.reduce() can be used to find the maximum element in a numeric array, by comparing each value:var arr = [1,2,3];var max = arr.reduce(function(a, b) { return Math.max(a, b);}, 0);Math.max.apply()The follow













