JS COUNCT CHARTERCY CHART в строке

let charFreq = str => {
  return str.split('').reduce((total, letter) => {
    total[letter] ? total[letter]++ : total[letter] = 1;
    return total;
  }, {});
};
Impossible Ibis