function a(){ console.log(1) new Promise((resolve,reject)=>{ console.log(2) resolve() }) .then(()=>{ console.log(3) }) console.log(4) } a()