title: Timing function for inner.html in 3 second intervals
body: <p>I want to create two variable functions and then activate them after a three seconds.</p>
  
  <pre><code>$(window).scroll(function() {
    let scroll = $(window).scrollTop();
    let year2 = () =&gt; {
      setTimeout(function() {
        document.getElementById("year").innerHTML = "2+ years"
      }, 3000);
    }
    let year3 = () =&gt; {
      setTimeout(function() {
        document.getElementById("year").innerHTML = "3+ years"
      }, 6000);
    }
    let scrollOne = scroll &gt; 20;
  
    if (scrollOne) {
      year2();
    } else {
      year3();
    }
  });
  </code></pre>