什么是JavaScript apply()方法?
javascriptapply()方法与call()方法相同,但是将函数参数视为数组。您可以尝试运行以下代码,了解如何在JavaScript中实现apply()方法-
示例
<html>
<head>
<script>
document.write("The highest number in the array list: ");
document.write(Math.max.apply(null,[50,90,18, 87]));
document
</script>
</head>
<body>
</body>
</html>输出结果
The highest number in the array list: 90
热门推荐
3 祝福语简短的微信
10 幼儿祝福语大全简短贺卡
11 感谢教官文案祝福语简短
12 鼠年同事祝福语简短创意
13 元旦祝福语 简短独特群发
14 妈咪跟我生日祝福语简短
15 给儿子新婚祝福语简短
16 伴娘祝福语长文案简短
17 恭喜高考完祝福语简短
18 生日祝福语送老公简短