Skip to content

Instantly share code, notes, and snippets.

@ttepasse
Created May 2, 2010 23:58
Show Gist options
  • Save ttepasse/387564 to your computer and use it in GitHub Desktop.
Save ttepasse/387564 to your computer and use it in GitHub Desktop.
Array.prototype.unique = function() {
var obj = {};
this.forEach(function (element) {
obj[element] = true
})
return obj.keys();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment