Skip to content

Instantly share code, notes, and snippets.

@cankemik cankemik/js merge arrays
Last active Aug 29, 2015

Embed
What would you like to do?
js merge arrays
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
You can’t perform that action at this time.