Skip to content

Instantly share code, notes, and snippets.

@bcls
Created November 16, 2017 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcls/d9c7bb80818f47b06d800fda8823016a to your computer and use it in GitHub Desktop.
Save bcls/d9c7bb80818f47b06d800fda8823016a to your computer and use it in GitHub Desktop.
Append array to another array #javascript
/**
* Add one array to another
* @param {Array} a The array to add another array to
* @param {Array} b The array to add to array a
* @return {Array} Array a with b appended to it
*/
function combineArrays(a, b) {
a.push.apply(a, b);
return a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment