Remove an Array duplicates
Alon Valadji
2349

If you use TypeScript your last version needs to be written as:

```const removeDuplicates= <T>(array: T[]): T[] => Array.from(new Set(array));```

Could you provide a jsperf? I would like to know which of these solutions is the fastest one.

Like what you read? Give Malte Legenhausen a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.