获取数组总最小\最大值

Array.prototype=function(){

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

}

Array.prototype=function(){

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

}

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

今天看到了,记下来!

posted @ 2012-04-09 23:41  一只柯楠  阅读(129)  评论(0编辑  收藏  举报