--cięcie--
d3.select("textarea").on("input", e => {
   let frequencies = {};

   e.target.value.split("").forEach(char => {
     let currentCount = frequencies[char] || 0;
     frequencies[char] = currentCount + 1;
   });

   console.log(frequencies);
});
