返回数组中最小/大值,适用数组

//返回数组中的最小值

function min(target){
    return Math.min.apply(0,target);          
}

//返回数组中的最大值

 function max(target){
     return Math.max.apply(0,target);
 }

 

posted on 2014-07-10 00:11  violinxliu  阅读(237)  评论(0编辑  收藏  举报