Skip to content

Instantly share code, notes, and snippets.

@jens-a-e
Created January 6, 2011 17:58
Show Gist options
  • Save jens-a-e/768265 to your computer and use it in GitHub Desktop.
Save jens-a-e/768265 to your computer and use it in GitHub Desktop.
Make an Array with unique members in javascript
/* Make an Array with unique members */
Array.prototype.unique = function(){
return this.filter(function(){return arguments[2].indexOf(arguments[0],arguments[1]+1)<0})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment