5

new Promise(function (resolve, reject) {
self.getPaid(function (err, money) {
if(err) {
reject(err);
console.log("fml");
} else {
resolve(money);
console.log("fuck yeah!") ;
});
})
.then(resolve)
.catch(reject);

Comments
Add Comment