Skip to content

Instantly share code, notes, and snippets.

@silvandiepen
Created February 20, 2023 12:48
Show Gist options
  • Save silvandiepen/cb43e90d1e8982dcb1ca4d5fc4ce5551 to your computer and use it in GitHub Desktop.
Save silvandiepen/cb43e90d1e8982dcb1ca4d5fc4ce5551 to your computer and use it in GitHub Desktop.
Remove duplicates from array
const characters = ['A', 'A', 'B', 'B', 'C'];
const uniqueCharacters = [...new Set(characters)];
console.log(uniqueCharacters);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment