title: Understanding the Promises/A+ specification
body: <p>The <a href="https://promisesaplus.com/" rel="nofollow noreferrer">Promises/A+</a> specification is one of the smallest specifications. Hence, implementing it is the best way to understand it. The following answer by Forbes Lindesay walks us through the process of implementing the Promises/A+ specification, <a href="https://stackoverflow.com/a/23785244/783743">Basic Javascript promise implementation attempt</a>. However, when I <a href="https://github.com/promises-aplus/promises-tests" rel="nofollow noreferrer">tested</a> it the <a href="https://gist.github.com/aaditmshah/1f3f5e42bcab83ca2663" rel="nofollow noreferrer">results</a> were not satisfactory:</p>
  
  <pre class="lang-none prettyprint-override"><code>✔ 109 tests passed
  ✘ 769 tests failed
  </code></pre>
  
  <p>Clearly, the Promises/A+ specification is not as easy to implement as it seems. How would you implement the specification and explain your code to a novice? Forbes Lindesay does an excellent job explaining his code but unfortunately his implementation is incorrect.</p>