Created
October 18, 2024 21:47
-
-
Save lgrachov/ac59a8454d0d7acfe0e383f8f092edb2 to your computer and use it in GitHub Desktop.
Remove duplicate characters in a string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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