impatient-js icon indicating copy to clipboard operation
impatient-js copied to clipboard

Chapter: Asynchronous programming in JavaScript

Open rauschma opened this issue 7 years ago • 7 comments
trafficstars

rauschma avatar Jul 19 '18 03:07 rauschma

39.1.3 Callback-based asynchronous functions :

In the code snippet the second parameter of the callback is named result. But later on in the text, the parameter is called r:

A result r: Then the following task is added to the queue. taskQueue.enqueue(() => callback(null, r));

I'd suggest to use result in both places.

AndiPersti avatar Jul 11 '21 10:07 AndiPersti

@AndiPersti True, thanks! Fixed in next release.

rauschma avatar Jan 02 '22 12:01 rauschma

In 39.2 "The call stack" section:

https://exploringjs.com/impatient-js/ch_async-js.html#the-call-stack

Error.prototype.stack is non-standard:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack

It's implemented in all platforms though. Maybe mention this fact a little bit?

0fye avatar Apr 04 '22 07:04 0fye

@0fye Yes! Mentioned here: https://exploringjs.com/impatient-js/ch_exception-handling.html#error-stack

rauschma avatar Apr 04 '22 08:04 rauschma

Ahh nice, thanks!!! @rauschma

0fye avatar Apr 04 '22 08:04 0fye