我一直在研究promise 、等待和异步功能.当我刚刚处于学习promise 的阶段时,我偶然发现了这一点:
async function async1(){
console.log('Async 1');
await func2(); // *
console.log('AFter Async 1');
}
async function async2(){
console.log('FROM async 2');
}
async1();
console.log('Synchronous'); //**
这会导致类似的结果:
Async 1
FROM async 2
Synchronous
AFter Async 1
代码是如何从*跳到**的.微任务在这里是如何使用的?