loading...

re: How to Escape Callback Hell with JavaScipt Promises VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Great article! We can condense that even further (no need to write the arguments here) fightTheDemogorgon() .then((result) => rollForDamage(re...
 

One thing worth noting regarding the shortform though, is that

fightTheDemogorgon()
  .then(rollForDamage)

actually becomes something along the lines of

fightTheDemogorgon()
   .then(function(result) {
   });

rather than

fightTheDemogorgon()
   .then((result) => ...);

which might come with unintended side effects to function scoping and what this actually points to.

code of conduct - report abuse