title: Changing the H1 with for loop in JavaScript
body: <p>JS newbie here. I am trying to get all the values in an H1 tag and change the ones have lower than 4 lengths.</p>
  <p>It says &quot;Please Answer the Questions&quot; I need it to say &quot;Please answer Hello Questions&quot;</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let header = document.getElementById("h1").innerHTML;
  let splittedText = header.split(" ");
  
  function seperateText() {
    for (let i = 0; i &lt; splittedText.length; i++) {
      if (splittedText[i].length &lt; 4) {
  
        splittedText[i].innerHTML = "Hello"
      }
    }
    // console.log(splittedText[i]);
    return splittedText[i].innerHTML;
  }
  seperateText();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1 id="h1"&gt;Please Answer the Questions&lt;/h1&gt;</code></pre>
  </div>
  </div>
  </p>