File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 5
5
//is exactly three characters between a and b). Otherwise return the string false.
6
6
7
7
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
9
9
10
10
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
12
12
if ( strCap [ i + 4 ] == "B" ) {
13
- return true ; //return true
13
+ return true ; //return true
14
14
}
15
15
}
16
- return false ; //otherwise return false
16
+ return false ; //otherwise return false
17
17
}
18
- } ;
18
+ } ;
You can’t perform that action at this time.
0 commit comments