Skip to content

Instantly share code, notes, and snippets.

@omsharp
Created September 19, 2021 17:47
Show Gist options
  • Save omsharp/548656dd79ec662efc2f961330aec35b to your computer and use it in GitHub Desktop.
Save omsharp/548656dd79ec662efc2f961330aec35b to your computer and use it in GitHub Desktop.
A delay function
function delay(delayInms) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(2);
}, delayInms);
});
}
await delay(500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment