Created
July 17, 2019 21:55
-
-
Save adamrosloniec/0b140381c2eece1f793a367f814ce709 to your computer and use it in GitHub Desktop.
ES6 - Extract unique characters from string
This file contains 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
dataOld = 'asdasdasdasdasdasdasda'; | |
const dataNew = [...new Set(dataOld)].join('') | |
// 'asd' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment