javascript获取数组种最大值?

Array.prototype.max = function () {
    return Math.max.apply({}, this)
}


Array.prototype.min = function () {
    return Math.min.apply({}, this)
}

例如:

[1,2,3].max()// => 3
[1,2,3].min()// => 1

技术交流QQ群:15129679

原文地址:https://www.cnblogs.com/yeminglong/p/5941755.html