title: How does Promise run when .then method is not called?
body: <p>I create two promises, but I do not run the then method on those promises. Yet once the promise objects go out of scope, the promise code runs as if <code>.then</code> was called.</p>
  
  <p>How is a <code>Promise</code> settled without a call to the <code>.then</code> method?</p>
  
  <p>I am asking because I would like to load an array with <code>Promise</code> objects and then run the promises in sequence. </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>function promises_createThenRun() {
    const p1 = createPromise1();
    const p2 = createPromise2();
  
    console.log('before hello');
    alert('hello');
    console.log('after hello');
    // the two promises run at this point.  What makes them run?
  }
  
  function createPromise1() {
    let p1 = new Promise((resolve, reject) =&gt; {
      window.setTimeout(() =&gt; {
        console.log('timer 1');
        resolve();
      }, 2000);
    });
    return p1;
  }
  
  function createPromise2() {
    let p2 = new Promise((resolve, reject) =&gt; {
      window.setTimeout(() =&gt; {
        console.log('timer 2');
        resolve();
      }, 1000);
    });
    return p2;
  }</code></pre>
  </div>
  </div>
  </p>