Problem

Return how many digit characters (0–9) appear in s.

Examples

  • countDigits("a1b2") -> 2
  • countDigits("abc") -> 0
Compile and test (Ctrl+Enter)