Skip to content

Instantly share code, notes, and snippets.

@blatyo
Created August 28, 2009 14:33
Show Gist options
  • Select an option

  • Save blatyo/177006 to your computer and use it in GitHub Desktop.

Select an option

Save blatyo/177006 to your computer and use it in GitHub Desktop.
Object.extend(Array.prototype, {
union: function(otherArray){
if(!Object.isArray(otherArray)) return this;
return this.without.apply(this, this.without.apply(this, otherArray));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment