Skip to content

Instantly share code, notes, and snippets.

@jhenaoz
Created May 29, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhenaoz/988dbafaaf9734c0424b26510e46b4c7 to your computer and use it in GitHub Desktop.
Save jhenaoz/988dbafaaf9734c0424b26510e46b4c7 to your computer and use it in GitHub Desktop.
this is an example about promise
function wait(method, time) {
return new Promise((resolve) => {
setTimeout(resolve(method()), time);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment