Great article! We can condense that even further (no need to write the arguments here)
fightTheDemogorgon() .then((result) => rollForDamage(result))
Becomes
fightTheDemogorgon() .then(rollForDamage)
Chaining, aka the Power of Friendship
That's just genius 😂
Nice catch!
One thing worth noting regarding the shortform though, is that
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.
this
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
Great article! We can condense that even further (no need to write the arguments here)
Becomes
That's just genius 😂
Nice catch!
One thing worth noting regarding the shortform though, is that
actually becomes something along the lines of
rather than
which might come with unintended side effects to function scoping and what
this
actually points to.