Skip to content

Instantly share code, notes, and snippets.

@yardfarmer yardfarmer/Array.js
Created Apr 10, 2016

What would you like to do?
巧妙的数组合并 merge
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
You can’t perform that action at this time.