Examples of using apply function 发表于 2014-07-25 | | 阅读次数 Example 1: Append an array to another array. 12345var arr1 = [1, 2, 3];var arr2 = [4, 5, 6];Array.prototype.push.apply(arr1, arr2);console.log(arr1); // [1, 2, 3, 4, 5, 6] Example 2: Get the max/min item in an array of numbers. 123var numbers = [12, 1, 35, 98, 34, 100];var max = Math.max.apply(Math, numbers);var min = Math.min.apply(Math, numbers); 本文作者: IIssNan 本文链接: http://notes.iissnan.com/2014/some-examples-of-using-apply-function/ 版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!