javascript 通过 Promise 和async&await 实现sleep函数
const sleep = (delay) => new Promise((_) => setTimeout(_, delay))
const repeatedTest = async () => {
await sleep(1000)
console.log("First")
await sleep(1000)
console.log("Second")
await sleep(1000)
console.log("Third")
}
repeatedTest()