Check for repeated characters in a string Javascript October 4, 2022 by Tarik This will do: function hasRepeats (str) { return /(.).*\1/.test(str); }