下面兩段代碼let arr1 = [1, 2, 3, 4, 5];let arr2 = [6, 7, 8, 9, 10];Array.prototype.push.apply(arr1, arr2);let arr1 = [1, 2, 3, 4, 5];let arr2 = [6, 7, 8, 9, 10];[].push.apply(arr1, arr2)這兩種寫法得到的結果是相同的,它們有什么區別嗎?
[ ].push.apply()和Array.prototype.push.apply()有區別嗎?
牧羊人nacy
2018-12-27 22:14:19