Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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