Last active
August 29, 2015 14:24
-
-
Save cankemik/da1395dd78d2c5075d48 to your computer and use it in GitHub Desktop.
js merge arrays
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 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