I have a string with repeated letters. I want letters that are repeated more than once to show only once. For instance I have a string aaabbbccc i want the result to be abc.
The one line solution will be to use Set. const chars = [...new Set(s.split(''))];
const chars = [...new Set(s.split(''))];