一直在看Promise和subscribe的用法,看到一篇不错的blog,原文在https://juejin.im/post/5a3e4fabf265da430b7b71dc

关于Promise, 重点看这个例子: let promise = new Promise(function(resolve, reject){ console.log("Promise"); resolve(); }); promise.then(function(){ console.log("resolved."); }); console.log("Hi!"); // Promise // Hi! // resolved.