title: Why does returning Promise.resolve() inside `then` cause two promise creation instead of one?
body: <p>Actually, I don't know how to check this on real Promise super class, so I'm testing it with a class extending it. But it seems to me the result would be the same.</p>
  
  <pre><code>class PromisePlus extends Promise {
    constructor (handler) {
      super(handler)
  
      console.log('new promise created')
    }
  }
  
  new PromisePlus((resolve, reject) =&gt; {
    resolve()
  }).then(() =&gt; {
    return 'GOOD'
  }).then(msg =&gt; {
    console.log(msg)
  })
  </code></pre>
  
  <p>prints 'new promise created' 3 times</p>
  
  <pre><code>new PromisePlus((resolve, reject) =&gt; {
    resolve()
  }).then(() =&gt; {
    return PromisePlus.resolve('BAD')
  }).then(msg =&gt; {
    console.log(msg)
  })
  </code></pre>
  
  <p>prints 'new promise created' 5 times.</p>
  
  <p>The same result with returning new Promise inside <code>then</code> handler</p>
  
  <pre><code>new PromisePlus((resolve, reject) =&gt; {
    resolve()
  }).then(() =&gt; {
    return new PromisePlus((resolve, reject) =&gt; {
      resolve('BAD')
    })
  }).then(msg =&gt; {
    console.log(msg)
  })
  </code></pre>
  
  <p>Obviously, <code>PromisePlus.resolve()</code> creates new promise, but why does returning <code>PromisePlus.resolve()</code> inside <code>then</code> cause one more extra promise creation?</p>