获取数组总最小\最大值

Array.prototype=function(){

  retrurn Math.min.apply(Math,this);

}

Array.prototype=function(){

  retrurn Math.Max.apply(Math,this);

}

Math对象的其他方法也可以类似方法借用。

今天看到了,记下来!

posted @   一只柯楠  阅读(133)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示