Skip to content

Commit 4d9bba4

Browse files
committed
Update 11-CoderByte-AB-Check.js
1 parent 1da47b0 commit 4d9bba4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

11-CoderByte-AB-Check.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
//is exactly three characters between a and b). Otherwise return the string false.
66

77
function ABCheck(str) {
8-
var strCap = str.toUpperCase(); //Put the string in all caps to make it easier for the if statements
8+
var strCap = str.toUpperCase(); //Put the string in all caps to make it easier for the if statements
99

1010
for (var i = 0; i < strCap.length; i++){ //loop through each character of the string
11-
if (strCap[i] == "A"){ //If A is found then and B is found 4 spaces after
11+
if (strCap[i] == "A"){ //If A is found then and B is found 4 spaces after
1212
if (strCap[i+4] == "B"){
13-
return true; //return true
13+
return true; //return true
1414
}
1515
}
16-
return false; //otherwise return false
16+
return false; //otherwise return false
1717
}
18-
};
18+
};

0 commit comments

Comments
 (0)