Skip to content

Commit e4de3c6

Browse files
added curly bracket
1 parent ebfb090 commit e4de3c6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
function countChar(stringOfCharacters, findCharacter) {
2-
3-
let count = 0;
4-
for (let char of stringOfCharacters) {
5-
if (char === findCharacter) {
6-
count++;
2+
let count = 0;
3+
for (let char of stringOfCharacters) {
4+
if (char === findCharacter) {
5+
count++;
6+
}
77
}
8+
9+
return count;
810
}
9-
return count;
1011

1112
module.exports = countChar;

0 commit comments

Comments
 (0)