Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dedup
['3','4','3','7'].reduce(function(prev, item){
if(!Array.isArray(prev)){
prev = [prev];
}
if(prev.indexOf(item.toLowerCase())===-1){
prev.push(item.toLowerCase());
}
return prev;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.