33

你也可以手写自己的Promise(一)

 5 years ago
source link: https://juejin.im/post/5b5a9603f265da0f6825dbea
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
我写这篇文章不打算介绍Promise产生的原因以及它解决的问题,我只是想写一篇关于实现自己Promise的文章。如果代码以及逻辑有什么不对的地方,请大家指出来。就这些,开始正题。 前提:我们要知道Promise是基于Promises/A+规范的。其中好多变量和

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK