.Pà JavaScript
var doSome = new Promise(function(resolve, reject){
resolve('I am doing something');
});
doSome.then(function(value){
console.log(value);
});
Borma
var doSome = new Promise(function(resolve, reject){
resolve('I am doing something');
});
doSome.then(function(value){
console.log(value);
});
promiseObject.then(onFulfilled, onRejected);
Promise me that you’ll go to the supermarket
.then(you’ll make dinner with the ingredients you bought)
.then(i’ll do the washing up)