什么是JavaScript apply()方法 javascript的apply()方法与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> HTMLCopy 输出 The highest number in the array list: 90HTMLCopy