setTimeout(() => { console.log(1) }, 0); new Promise((resolve) => { console.log(2); for( var i=0 ; i<1000000 ; i++ ) { i == 9999 && resolve(); } console.log(3); }).then(() => { console.log(4); }); console.log(5);
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题