title: How to speed up a set-interval process in the middle and back to slow at end
body: <p>I am working on the below example code. How can I add some sugar to this function an a a way to start and end smooth but speed up (for example with speed of 100 instead of 100 in the middle of process?</p>
  <p>For example from:</p>
  <pre><code>90  -&gt; 120  = speed 1000 
  120 -&gt; 240  = speed 100
  240 -&gt; 270  = speed 1000
  </code></pre>
  <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 i = 90;
  setInterval(function() {
    if (i &lt; 180) {
      i++;
      console.log(i)
    }
  
  }, 1000);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>