Skip to content

Instantly share code, notes, and snippets.

@snsxn
Created August 26, 2022 14:43
Show Gist options
  • Save snsxn/4ed22d0d82ca43d771d820d1d88cb289 to your computer and use it in GitHub Desktop.
Save snsxn/4ed22d0d82ca43d771d820d1d88cb289 to your computer and use it in GitHub Desktop.
One-line remove duplicates from an Array - JavaScript ES2015, ES6
const removeDuplicates = (arr) => [...new Set(arr)];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment