Skip to content

Instantly share code, notes, and snippets.

@timoweiss
Created April 29, 2014 12:06
Show Gist options
  • Save timoweiss/11398251 to your computer and use it in GitHub Desktop.
Save timoweiss/11398251 to your computer and use it in GitHub Desktop.
get unique array
var getUniqueArray = function(arr) {
return arr.reduce(function(p, c) {
if (p.indexOf(c) < 0) p.push(c);
return p;
}, []);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment