Exercise count digits in file


Write a function that receives a string as a parameter and returns an array of 10 numbers, the number of each digit in the file. At first you can assume the file contains a single row containing only digits: 234566. Then make the input file more complex

In each case we only need to count the number of each digit.