ECMAScript Cookbook
上QQ阅读APP看书,第一时间看更新

Creating and waiting for Promises

Promises provide a way to compose and combine asynchronous functions in an organized and easier to read way. This recipe demonstrates a very basic usage of promises.