function(e){let t=e.split(""),r=!1;for(let[e,i]of t.entries())i===t[e+1]&&(r=!0);return r}

result

true
function(e){return/([a-zA-Z])\1/.test(e)}

result

true