Skip to content

Instantly share code, notes, and snippets.

@shaggybb
Last active August 29, 2015 14:15
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 shaggybb/7cc3ce8226065e6442a0 to your computer and use it in GitHub Desktop.
Save shaggybb/7cc3ce8226065e6442a0 to your computer and use it in GitHub Desktop.
Add array inside another one in specific position
if (!Array.prototype.spliceArray) {
Array.prototype.spliceArray = function(index, n, array) {
return Array.prototype.splice.apply(this, [index, n].concat(array));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment