Skip to content

Instantly share code, notes, and snippets.

@seleb
Created November 29, 2018 00:17
Show Gist options
  • Select an option

  • Save seleb/71ac26c3833207d93770d16c3abaf118 to your computer and use it in GitHub Desktop.

Select an option

Save seleb/71ac26c3833207d93770d16c3abaf118 to your computer and use it in GitHub Desktop.
get array of unique words in list
var l = ['word','list']
copy(
Object.keys(
l.reduce(
(res, word)=>({
...res,
[word]:true
}),
{}
)
).sort()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment