Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mustafa Kemal Tuna lumosmind

🎯
Focusing
View GitHub Profile
View promise-example-one.js
const id = 21;
function executor (resolve, reject){
getData(id, resolve)
};
function handler(result){
console.log(result)
};
View promise-example-two.js
let id = 21;
function executor (resolve, reject){
getData(id, resolve)
};
const myPromise = new Promise(executor);
myPromise
.then((result)=>{