Skip to content

Commit 8979be1

Browse files
author
russom
committed
Unnecessary code removed.
1 parent 8253891 commit 8979be1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ function countChar(stringOfCharacters, findCharacter) {
44
for (let i = 0; i < stringOfCharacters.length; i++) {
55
if (stringOfCharacters[i] === findCharacter) {
66
count++;
7-
} else {
8-
return count;
97
}
108
}
119
return count;
1210
}
13-
console.log(countChar("bbbbb", "b"));
11+
1412
module.exports = countChar;

0 commit comments

Comments
 (0)