remove multiple duplicates character from string js code example
Example: remove repeated characters from a string in javascript
const unrepeated = (str) => [...new Set(str)].join('');
unrepeated("hello"); //➞ "helo"
unrepeated("aaaaabbbbbb"); //➞ "ab"
unrepeated("11112222223333!!!??"); //➞ "123!?"