Skip to content

Instantly share code, notes, and snippets.

@jhenaoz jhenaoz/promise.js
Created May 29, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.