# Exercise: Count digits

* Given an array of digits, count how many times each digit appears.

```
let digits = [1, 2, 1, 3, 4, 5, 6, 7, 8, 8, 4, 3, 9, 7, 8, 5, 2, 3, 3, 2, 2, 4, 2, 4, 2, 1];
```

{% embed include file="src/examples/arrays/count-digits/out.out" %}


