题解 | #检查重复字符串#
检查重复字符串
https://www.nowcoder.com/practice/5ef31f11adf64d9fb18d74860e9ab873
function containsRepeatingLetter(str) {
for(let i=0; i<str.length-1; i++) {
if(('a'<=str[i] && str[i]<='z') || ('A'<=str[i] && str[i]<='Z')) {
if(str[i] === str[i+1]) {
return true;
}
}
}
return false;
}