Exercise: Count digits from string
- Given a string of numbers, count how many times each digit appears.
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
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