摘要: Promise是异步编程的一种解决方案,也是ES6的写法,它其实是一个构造函数,自己身上有all、reject、resolve这几个方法,原型上有then、catch等方法。 不多说,直接上代码: const promise = new promise(function(resolve, rejec 阅读全文
posted @ 2020-11-09 22:16 薄荷+猫 阅读(185) 评论(0) 推荐(0) 编辑