59

【理解ES7async/await并实现】手把手进行ES6异步编程:Generator + Promise = Async/A...

 5 years ago
source link: https://juejin.im/post/5cb9721cf265da03b36ee346
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.
概念 Generator 函数是 ES6 提供的一种异步编程解决方案,执行 Generator 函数会返回一个遍历器对象,也就是说,Generator 函数除了状态机,还是一个遍历器对象生成函数。返回的遍历器对象,可以依次遍历 Generator 函数内部的

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK