Skip to content

Instantly share code, notes, and snippets.

@reneviering
Created November 19, 2015 14:05
Show Gist options
  • Select an option

  • Save reneviering/ef565a18dbfb054da596 to your computer and use it in GitHub Desktop.

Select an option

Save reneviering/ef565a18dbfb054da596 to your computer and use it in GitHub Desktop.
Find distinct values of an Array.
[1,1,2,2].filter(function(value, index, self) {
return self.indexOf(value) === index;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment