var timeOutFunc = () => {
return new Promise((a, b) => {
setTimeout(async () => {
console.log(2)
await timeOutFunc()
console.log(1)
}, 1000);
});
}
await timeOutFunc()
console.log(3)
执行上面的代码会阻塞住,无限打印2,不会打印1和3