Open tradyau opened 3 years ago
console.log('1'); async function async1() { console.log('2'); await async2(); console.log('3'); } async function async2() { console.log('4'); } process.nextTick(function () { console.log('5'); }) setTimeout(function () { console.log('6'); process.nextTick(function () { console.log('7'); }) new Promise(function (resolve) { console.log('8'); resolve(); }).then(function () { console.log('9') }) }) async1(); new Promise(function (resolve) { console.log('10'); resolve(); }).then(function () { console.log('11'); }); console.log('12');
https://mp.weixin.qq.com/s/AZsRMuD3ldth6NSjfWcnIg
https://github.com/Amarok1217/rumination/blob/master/JavaScript%E7%9B%B8%E5%85%B3/%E8%BF%90%E8%A1%8C%E6%97%B6/%E4%BA%8B%E4%BB%B6%E5%BE%AA%E7%8E%AF/JS%E7%9A%84%E4%BA%8B%E4%BB%B6%E5%BE%AA%E7%8E%AF.md
https://segmentfault.com/a/1190000019494012
https://juejin.cn/post/6844903512845860872