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.
const countUnique = (s1, s2) => new Set(s1 + s2).size
a shorter way based on @le_m answer