2621. Sleep
https://leetcode.com/problems/sleep/
Javascript
async function sleep(millis) {
return new Promise((resolve, reject) => setTimeout(() => resolve(), millis))
}
Typescript
async function sleep(millis: number): Promise<void> {
return new Promise((resolve, reject) => setTimeout(() => resolve(), millis))
}