Currently, I got an array like that:
var uniqueCount = Array();
After a few steps, my array looks like that:
uniqueCount =
uniqueCount = ["a","b","a","c","b","a","d","b","c","f","g","h","h","h","e","a"]; var count = {}; uniqueCount.forEach((i) => { count[i] = ++count[i]|| 1}); console.log(count);