There was an error while loading. Please reload this page.
1 parent 1379d50 commit d86c3edCopy full SHA for d86c3ed
1 file changed
Sprint-3/2-practice-tdd/count.js
@@ -1,7 +1,4 @@
1
function countChar(stringOfCharacters, findCharacter) {
2
- if (!stringOfCharacters.includes(findCharacter)) {
3
- return 0;
4
- }
5
return stringOfCharacters.split("").filter((char) => char === findCharacter)
6
.length;
7
}
0 commit comments