Skip to content

Instantly share code, notes, and snippets.

@ckhatton
Created December 9, 2014 00:19
Show Gist options
  • Save ckhatton/02f801ca2cc04bd8c412 to your computer and use it in GitHub Desktop.
Save ckhatton/02f801ca2cc04bd8c412 to your computer and use it in GitHub Desktop.
Remove specific values from an array.
function removeFromArray(value, array) {
return $.grep(array, function(elem, index) {
return elem !== value;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment