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.
Here is the simplest function to do that pt. 2
const showUniqChars = (text) => { let uniqChars = ""; for (const char of text) { if (!uniqChars.includes(char)) uniqChars += char; } return uniqChars; };