module_wait
wait ⇒ Promise.<void>
Section titled “wait ⇒ Promise.<void>”A function that returns a promise that resolves after a specified delay.
Returns: Promise.<void> - - A promise that resolves after the specified delay.
| Param | Type | Default | Description |
|---|---|---|---|
| [delay] | number | 0 | The delay, in milliseconds, before the promise should resolve. |
Example
async function async() { await wait(2000) console.log("Something")}async()