✨ keith is
someone who very little attention span

Example Snippet

2020 November 24th
2
Back to Snippets

To remove duplicates from an array, you can force your data into a set and then destructure.

javascript
const arrayWithValues = [1, 1, 2, 3, 4]
const arrayWithoutDuplicates = [...new Set(arrayWithValues)] // 1, 2, 3, 4
home