marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.01k stars 795 forks source link

Ch11, Callbacks section: a few small items #392

Closed dhollinden closed 6 years ago

dhollinden commented 6 years ago
  1. In this sentence:

"The third argument given to the handler, done, is a callback function that it must call when it is done with the request."

The "done" argument is the fourth argument.

  1. Since the above sentence refers to two functions, the handler and the callback, the next sentence would be more immediately clear if the function being referred to was specified, like this:

"If we had used the handler function’s return value as the response value, that would mean that a request handler can’t itself perform asynchronous actions."

  1. There was a missed opportunity to refer to crow callbacks as "cawbacks" (sorry if you've heard that a million times already :)
marijnh commented 6 years ago

Attached patch should help.

dhollinden commented 6 years ago

I'm still seeing, "The third argument given to the handler...

in the browser, instead of

"The fourth argument given to the handler...

marijnh commented 6 years ago

I hadn't rebuilt the HTML on the site yet. Should be better now.