WeCodeAcademy

Wait for a delay with async and await

Wrap setTimeout in a Promise, then await it inside an async function.

Examplejavascript
Open in editor »

More JavaScript recipes