Skip to content

Instantly share code, notes, and snippets.

@robskidmore
Created September 30, 2017 18:07
Show Gist options
  • Save robskidmore/74191686962d20930961643b85caee57 to your computer and use it in GitHub Desktop.
Save robskidmore/74191686962d20930961643b85caee57 to your computer and use it in GitHub Desktop.
A quick diff array function for debugging in the console.
Array.prototype.diff = function (a) {
return this.filter(function (i) {
return a.indexOf(i) === -1;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment