setTimeout(() => { console.log(1) }) function a() { return new Promise((resolve) => { console.log(2) resolve() }) } a().then(res => { console.log(3) }) console.log(a().then(res => { console.log(3) }), 123)