Currently, I got an array like that:
var uniqueCount = Array();
After a few steps, my array looks like that:
uniqueCount =
var testArray = ['a','b','c','d','d','e','a','b','c','f','g','h','h','h','e','a'];
var newArr = []; testArray.forEach((item) => { newArr[item] = testArray.filter((el) => { return el === item; }).length; }) console.log(newArr);