title: How to make properly concurrent javascript asynchronous promise?
body: <p><strong>strong text</strong></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>setInterval(() =&gt; {
    console.log('tick');
  }, 2000);
  
  async function sumIncrementally() {
    let promise = new Promise((resolve, reject) =&gt; {
      let result = 0;
      for (let i = 0; i &lt; 1e10; i++) {
        result += i;
      }
      resolve(result);
    });
  
    promise.then(console.log);
  }
  
  sumIncrementally();</code></pre>
  </div>
  </div>
  </p>
  <p>Till Now, the output is like,</p>
  <p>49999999990067860000
  tick
  tick
  ...</p>
  <p>Here, I want to get output like</p>
  <p>tick
  tick
  ....
  tick
  49999999990067860000
  tick
  tick
  ...</p>
  <p>How Can I get this like of concurrency in javascript?</p>