So here's what I have so far...
function doubleCheck(str){
for (var i = 0; i <= str.length; i++){
var n = i + 1;
if (str[i] === str[n]){
return "True";
}
}
}
I'm pretty new to Javascript. I googled around and I see there are better ways to solve this problem probably, but I can't figure out why this isn't working the way I think it should. If I pass a word without two consecutive letters like "train" this still returns true. Any help is appreciated.