Skip to content

Commit 1da9615

Browse files
committed
Wrote the code for count function
1 parent f122d5d commit 1da9615

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function countChar(stringOfCharacters, findCharacter) {
2-
return 5
2+
return stringOfCharacters.split(findCharacter).length - 1;
33
}
44

55
module.exports = countChar;

0 commit comments

Comments
 (0)