js 获取Array数组 最大值 最小值

 https://stackoverflow.com/questions/1669190/find-the-min-max-element-of-an-array-in-javascript

    // 错误:
    // var maxRowIndex=Math.max(parentRows);
    // var minRowIndex=Math.min(parentRows);
    // var maxRowIndex=parentRows.max();
    // var minRowIndex=parentRows.min();
    
    // 正确:
    var maxRowIndex=Math.max(...parentRows);
    var minRowIndex=Math.min(...parentRows);
原文地址:https://www.cnblogs.com/zealousness/p/10530799.html