title: Can this javascript code be written elegantly?
body: <p>Can some one help me to write this code elegantly as I am new to javascript. I am adding this to wordpress so I tried jquery already and for some reason it doesn't work so I tried this approach which is working but I don't like the way it's written. </p>
  
  <p>If someone could help me to write in a better way that would be great. Thanks!</p>
  
  <pre><code>var par01 = document.getElementById("tt-insights-home").getElementsByClassName("excerpt")[0].innerHTML;
  var par02 = document.getElementById("tt-insights-home").getElementsByClassName("excerpt")[1].innerHTML;
  var par03 = document.getElementById("tt-insights-home").getElementsByClassName("excerpt")[2].innerHTML;
  var slicedPar01 = par01.slice(0, -17);
  var slicedPar02 = par02.slice(0, -17);
  var slicedPar03 = par03.slice(0, -17);
   document.getElementById("tt-insights-home").getElementsByClassName("excerpt")[0].innerHTML = slicedPar01;
   document.getElementById("tt-insights-home").getElementsByClassName("excerpt")[1].innerHTML = slicedPar02;
   document.getElementById("tt-insights-home").getElementsByClassName("excerpt")[2].innerHTML = slicedPar03;
  </code></pre>