Currently, I got an array like that:
var uniqueCount = Array();
After a few steps, my array looks like that:
uniqueCount =
simplified sheet.js answare
var counts = {}; var aarr=['a','b','a']; aarr.forEach(x=>counts[x]=(counts[x] || 0)+1 ); console.log(counts)