下面这段async异步代码的执行顺序有些不理解,求大神能指导指导,最好能帮忙分析下相关微任务队列的过程asyncfunctionasync1(){returnnewPromise(resolve=>{Promise.resolve().then(()=>{async2().then(resolve)})}).then(()=>{console.log('async1end')})}asyncfunctionasync2(){}async1()Promise.resolve().then(function(){console.log('promise2')}).then(function(){console.log('promise3')}).then(function(){console.log('promise4')})//promise2//promise3//async1end//promise4
波斯汪
白猪掌柜的
相关分类