Skip to content

Instantly share code, notes, and snippets.

@lumosmind
Last active November 7, 2020 18:31
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 lumosmind/5aea24ae92106cdad95182355df9a00d to your computer and use it in GitHub Desktop.
Save lumosmind/5aea24ae92106cdad95182355df9a00d to your computer and use it in GitHub Desktop.
const id = 21;
function executor (resolve, reject){
getData(id, resolve)
};
function handler(result){
console.log(result)
};
const myPromise = new Promise(executor);
myPromise.then(handler);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment