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 44 点赞 0 评论 66 浏览