Open lzcdev opened 5 years ago
async function a1() { console.log('a1 start') await a2() console.log('a1 end') } async function a2() { console.log('async a2') } console.log("script start") setTimeout(function() { console.log('setTimeOut') },0) a1() new Promise(function(resolve) { console.log('promise1') resolve() }).then(function(){ console.log("promise2") }) console.log('script end')