Skip to content

Instantly share code, notes, and snippets.

@peterheard01
Created July 4, 2016 04:13
Show Gist options
  • Save peterheard01/b0fd6ed3803c4e653cc8db3f75389613 to your computer and use it in GitHub Desktop.
Save peterheard01/b0fd6ed3803c4e653cc8db3f75389613 to your computer and use it in GitHub Desktop.
// how to reduce a list of tags using a filter command
['mice','hats','coats','hats'].reduce((curr,prev) => { if(curr.indexOf(prev) < 0){curr.push(prev)};return curr; },[])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment