Skip to content

Commit c473ad8

Browse files
fix: apply prettier formatting
1 parent d02bb17 commit c473ad8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
function countChar(stringOfCharacters, findCharacter) {
2-
let count =0;
3-
for(let i=0; i<stringOfCharacters.length; i++){
4-
if(stringOfCharacters[i] === findCharacter){
5-
count=count+1;}}
6-
return count;
2+
let count = 0;
3+
for (let i = 0; i < stringOfCharacters.length; i++) {
4+
if (stringOfCharacters[i] === findCharacter) {
5+
count = count + 1;
6+
}
7+
}
8+
return count;
79
}
8-
console.log(countChar("banana","a"))//3
10+
911
module.exports = countChar;

0 commit comments

Comments
 (0)