Skip to content

Instantly share code, notes, and snippets.

@MikeFielden
Created July 8, 2015 21:41
Show Gist options
  • Save MikeFielden/4951f10bef4f6923fd2c to your computer and use it in GitHub Desktop.
Save MikeFielden/4951f10bef4f6923fd2c to your computer and use it in GitHub Desktop.
Array merge native
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