Open wuxianqiang opened 4 years ago
console.log('script start') new Promise((resolve, reject) => { console.log('promise1') resolve() }).then(() => { console.log('then11') new Promise((resolve, reject) => { console.log('promise2') resolve() }).then(() => { console.log('then2-1') }).then(() => { console.log('then2-2') }) }).then(() => { console.log('then12') }).then(() => { console.log('then13') }) console.log('script end')
答案
script start promise1 script end then11 promise2 then2-1 then12 then2-2 then13
答案