Considering the example given in the question, this is how we would sleep between two console logs: async function main() { console.log("Foo"); await sleep(2000); ...
確定! 回上一頁