Using JavaScript, I need to check if a given string contains a sequence of repeated letters, like this:
\"aaaaa\"
How can I do t
You can use this function:
function hasRepeatedLetters(str) { var patt = /^([a-z])\1+$/; var result = patt.test(str); return result; }