# Remove duplicates from a JavaScript Array

> By making use of Sets and the spread operator, we can quickly strip the duplicates with a Set then turn it back into an array in no time. Will return: [1…

- URL: https://graffino.com/til/quick-way-to-to-remove-duplicate-elements-from-a-javascript-array
- Author: Nick Ciolpan
- Channel: javascript
- Published: 2020-09-04
- Updated: 2021-10-13

By making use of Sets and the spread operator, we can quickly strip the duplicates with a Set then turn it back into an array in no time. 


```
[…new Set([1, 'Graffino', 1, 'Graffino', "Wha!"])];
```

Will return: [1, "Graffino", "Wha!"]
