Deviopath › TypeScript

Count a Character

Easy · Basic Types

Write countChar(text: string, char: string): number that returns how many times char appears in text.

The check is case-sensitive: "A" and "a" are different characters.

Next: Format a User