Exercise: Count digits from string



let text = "1213 456 78843978523 3224 2421";


0: 0
1: 3
2: 6
3: 4
4: 4
5: 2
6: 1
7: 2
8: 3
9: 1