Skip to content

Instantly share code, notes, and snippets.

@SeanJM
Last active December 23, 2015 14:22
Show Gist options
  • Save SeanJM/c7b7d36ea97053596b46 to your computer and use it in GitHub Desktop.
Save SeanJM/c7b7d36ea97053596b46 to your computer and use it in GitHub Desktop.
A function which removes members from an Array
function arrayRemove(array, removeList) {
var clone = array.slice();
removeList.forEach(function (a) {
while (clone.indexOf(a) > -1) {
clone.splice(clone.indexOf(a), 1);
}
});
return clone;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment