Creates a promise that resolves after the specified delay.
The number of milliseconds to wait before resolving.
A promise that resolves after the delay has elapsed.
await delay(1000); // Waits 1 second Copy
await delay(1000); // Waits 1 second
Creates a promise that resolves after the specified delay.