Hi there and thanks for your article. I didn't know about the Promise.allSettled and your article just made me discover this!
I think your example:
functiongetMoneyBack(money,callback){if(typeofmoney!=='number'){callback(null,newError('money is not a number'))}else{callback(money)}}constmoney=getMoneyBack(1200)console.log(money)
Is missing its callback:
functiongetMoneyBack(money,callback){if(typeofmoney!=='number'){callback(null,newError('money is not a number'))}else{returncallback(money)}}constmoney=getMoneyBack(1200,function(money){returnmoney*1.2;// applying some increase})console.log(money);
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi there and thanks for your article. I didn't know about the
Promise.allSettled
and your article just made me discover this!I think your example:
Is missing its callback: