Skip to Content

Promise 

  1. 有了 async/await, 我们和 Promise 还能像从前一样两小无猜吗? 
  2. 利用 generator 解决回调地狱 
  3. 史上最易读懂的 Promise/A+ 完全实现 
  4. yield 原理篇 
  5. 异步调用可以转化为同步调用吗? 

常见错误

  1. 在 class 的 constructor 中使用 await
class A { constructor() { await get() return 123 } } // 错误用法 const b = await new A();
Last updated on