Skip to content

Commit ea6c7f2

Browse files
minor amendment
1 parent bddc0bb commit ea6c7f2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sprint-3/2-practice-tdd/count.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
function countChar(stringOfCharacters, findCharacter) {
2-
32
let count = 0;
4-
3+
54
for (let char of stringOfCharacters) {
65
if (char === findCharacter) {
76
count++;
8-
}
97
}
10-
return count;
8+
}
9+
return count;
1110
}
1211

1312
module.exports = countChar;

0 commit comments

Comments
 (0)