2019年10月21日

如何实现一个串行promise

摘要: 异步执行任务A、B、C,。。。。。。 1、使用数组的reduce方法,reduce里有四个参数,pre,next,index,arr, 2、如果then方法里返回的是一个promise对象,那么执行下一个then 的时候必定是在上一个then执行完之后执行 代码如下 阅读全文

posted @ 2019-10-21 19:07 杨龙飞 阅读(2102) 评论(0) 推荐(0) 编辑

导航

Fork me on GitHub