0
/ 50
Implement the following method so that it counts the number of times the target
character appears in the given string and returns the...
Implement the following method so that it counts the number of
times the target
character appears in the given string and
returns the count.
Examples:
countOccurrences("abbcdd", 'b') -> 2
countOccurrences("XXXXX", 'X') -> 5
countOccurrences("12345", ' ') -> 0
Your feedback will appear here when you check your answer.