impatient-js
impatient-js copied to clipboard
Chapter: Asynchronous programming in JavaScript
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 True, thanks! Fixed in next release.
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 Yes! Mentioned here: https://exploringjs.com/impatient-js/ch_exception-handling.html#error-stack
Ahh nice, thanks!!! @rauschma