Async

delay

Helper to delay anything within an async function

Parameters

  • ms delay in milliseconds

Examples

```
const anyAsyncFunc = async () => {
 // do something
 console.log('before delay')
 // wait for 200ms
 await delay(200)
 // and do other things
 console.log('after delay')
}
```