Created
April 10, 2016 15:14
-
-
Save yardfarmer/bff534ba0dfe39382998e59951318ded to your computer and use it in GitHub Desktop.
巧妙的数组合并 merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mergeTo = [4,5,6]; | |
var mergeFrom = [7,8,9]; | |
Array.prototype.push.apply(mergeTo, mergeFrom); | |
mergeTo; // is: [4, 5, 6, 7, 8, 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment