文章地址:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply
利用Math.max.apply()方法获取数组最大值时,会有潜在的风险超过js解释引擎的长度限制,最大限制是:65536,如图:
推荐用如下方法:
时间: 2024-11-10 15:49:28
文章地址:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply