![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
promise
AF01
这个作者很懒,什么都没留下…
展开
-
promise练习题
求下面的promise对象控制台的打印结果顺序 promise测试题 new Promise(function(resolve, reject) { setTimeout(function() { console.log(111); // }, 2000); setTimeout(function() { console.log(11111111); //原创 2021-02-17 23:23:14 · 219 阅读 · 0 评论 -
promise练习题,一题看懂,了解原理
promise练习题,一题看懂,了解原理 console.log(1); let p1 = new Promise(function(resolve, reject) { setTimeout(function() { let flag = true; if (flag) { resolve(3); console.log(2); } else { reject('发生了错误哟'原创 2021-02-04 00:37:29 · 179 阅读 · 0 评论