const b = () => {
return new Promise(resolve => {
resolve();
Promise.resolve()
.then(() => {
console.log(1);
})
.then(() => console.log(3));
});
};
const a = async () => {
await b();
console.log(2);
};
a();
Different behavior on safari , chrome(firefox), any standard described about this ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…