Created
July 8, 2015 21:41
-
-
Save MikeFielden/4951f10bef4f6923fd2c to your computer and use it in GitHub Desktop.
Array merge native
This file contains hidden or 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 array1 = [1, 2, 3]; | |
var array2 = [4, 5, 6]; | |
Array.prototype.push.apply(array1, array2); | |
console.log(array1); // is: [1, 2, 3, 4, 5, 6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment