Skip to content

Instantly share code, notes, and snippets.

@romaimperator
Created June 7, 2013 03:03
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 romaimperator/5726803 to your computer and use it in GitHub Desktop.
Save romaimperator/5726803 to your computer and use it in GitHub Desktop.
Array.prototype.unique = function(a){
return function(){
return this.filter(a)
}
}(function(a,b,c){
return c.indexOf(a,b+1)<0
});
Array.prototype.unique = function() {
return this.filter(function(a,b,c) {
return c.indexOf(a,b+1) < 0;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment