Skip to content

Instantly share code, notes, and snippets.

@aristretto
Forked from jasdeepkhalsa/dedupe.js
Created March 21, 2014 21:16
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 aristretto/9696684 to your computer and use it in GitHub Desktop.
Save aristretto/9696684 to your computer and use it in GitHub Desktop.
var arr = [1,1,2];
var arr = arr.filter(function (v, i, a) { return a.indexOf (v) == i }); // dedupe array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment