We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c2b0f3 commit 6db0981Copy full SHA for 6db0981
Sprint-3/2-practice-tdd/count.js
@@ -1,5 +1,6 @@
1
function countChar(stringOfCharacters, findCharacter) {
2
- return 5
+ const characterOccurrence = stringOfCharacters.split(findCharacter).length - 1;
3
+ return characterOccurrence;
4
}
5
6
module.exports = countChar;
0 commit comments