Skip to content

Commit 9633c24

Browse files
committed
Change numOfa variable name to be more descriptive
1 parent c939e57 commit 9633c24

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎practice-tdd/count.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export function countChar(stringOfCharacters, findCharacter) {
2-
let numOfa = 0;
2+
let numOfChar = 0;
33

44
for (let i = 0; i < stringOfCharacters.length; i++) {
55
if (stringOfCharacters.charAt(i) === findCharacter) {
6-
numOfa++;
6+
numOfChar++;
77
}
88
}
99

10-
return numOfa;
10+
return numOfChar;
1111
}

0 commit comments

Comments
 (0)