Skip to content

Instantly share code, notes, and snippets.

@lgrachov
Created October 18, 2024 21:47
Show Gist options
  • Save lgrachov/ac59a8454d0d7acfe0e383f8f092edb2 to your computer and use it in GitHub Desktop.
Save lgrachov/ac59a8454d0d7acfe0e383f8f092edb2 to your computer and use it in GitHub Desktop.
Remove duplicate characters in a string.
function noDuplicateChars(str) {
return [...new Set(str.split(""))].join("")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment