js阻塞线程方法 var timeOutFunc = () => { return new Promise((a, b) => { setTimeout(async () => { console.log(2) await timeOutFunc() console.log(1) }, 1000); });}await timeOutFunc()console.log js 2023-10-13 143 点赞 2 评论 216 浏览