If you want a walkthrough on the JavaScript Promises API, look no further
ECMAScript 6 promises (2/2): the API
Dr. Axel Rauschmayer from ②ality writes
This blog post is an introduction to asynchronous programming via promises in general and the ECMAScript 6 (ES6) promise API in particular. It is second in a series of two posts - part one explains foundations of asynchronous programming (which you may need to learn in order to fully understand this post).
The ECMAScript 6 promise API is easy to polyfill for ECMAScript 5.
Read the article at 2ality.com