Promise((resolve, reject) => {
const a = 5;
(a > 10)
? resolve('Resolved')
: reject ('Rejected')
});
promise.then((item)=>{
console.log('promise resolved', item)
})
.catch((item)=>{
console.log('promise rejected', item)
});
promise.then((item)=>{
console.log('promise resolved-1', item)
})
.catch((item)=>{
console.log('promise rejected', item)
});
promise.then((item)=>{
console.log('promise resolved-2', item)
})
.catch((item)=>{
console.log('promise rejected', item)
});
promise.then((item)=>{
console.log('promise resolved-3', item)
})
.catch((item)=>{
console.log('promise rejected', item)
});
But that's not chaining
Обсуждают сегодня