老师,今天面试有一道代码题没有做对,就是promise的链式使用,看输出什么,但是里面有个return的部分,我不大明白,课程里也没有,麻烦您帮我看看,讲解一下,谢谢
new Promise((resolve, reject) => { console.log(1); setTimeout(() => { console.log(2); }); resolve(); }).then(() => { console.log(3); }).then(() => { return new Promise((resolve, reject) => { console.log(4); }).then(() => { console.log(5); }); }).then(() => { console.log(6); }); console.log(7);