Skip to content

Instantly share code, notes, and snippets.

@roblight
Forked from jasdeepkhalsa/dedupe.js
Created January 14, 2014 16:42
Show Gist options
  • Save roblight/8421369 to your computer and use it in GitHub Desktop.
Save roblight/8421369 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