js如何对数组使用Math.max()
导读:本文共275.5字符,通常情况下阅读需要1分钟。同时您也可以点击右侧朗读,来听本文内容。按键盘←(左) →(右) 方向键可以翻页。
摘要: 对数组使用 Math.max()您可以使用 Math.max.apply 来查找数组中的最高值:实例functionmyArrayMax(arr){returnMath.max.apply(null,arr);}Math.max.apply([1, 2, 3]) 等于 Math.max(1, 2, 3)。 </d... ...
音频解说
目录
(为您整理了一些要点),点击可以直达。对数组使用 Math.max()
您可以使用 Math.max.apply 来查找数组中的最高值:
实例
Math.max.apply([1, 2, 3]) 等于 Math.max(1, 2, 3)。
本文:
js如何对数组使用Math.max()的详细内容,希望对您有所帮助,信息来源于网络。