JavaScript: The Definitive Guide

Errata for JavaScript: The Definitive Guide

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date Submitted Date Corrected
Safari Books Online
section 6.2.3, 6.3.2, chapter 9

I had a pretty hard time understanding inheritance in Javascript, and I think the central problem was that prototypes are not associated with objects just via property access (i.e. o.prototype), but in some internal manner that is only accessible via Object.getPrototypeOf(o) or (apparently non-standardized but de facto available in most JS environments) via o.__proto__. This seems to me like a crucial piece of information that should be mentioned early on, i.e. that the prototype assigned to an object is not the same as its property o.prototype, that changing that property of the object does not change its prototype, and that there are significant internals that represent the prototype chain that aren't very visible and keep the chain from being changed by simple property assignment. I haven't gotten to chapter 14 yet, but a cursory glance at 14.3 tells me that those issues are probably being discussed there; if that's the case, then a forward reference at each of the relevant places with a short clarification that o.prototype is NOT the prototype assigned to an object and that there's some other mechanism to handle that association would have helped at least me quite a lot. There are also two TODOs left in the book, and a good number of editorial errors (mostly small grammatical errors); it's possible those are a matter of the book not being quite finished yet.

Georg Bachmeier  Apr 25, 2020  May 13, 2020
Safari Books Online
Node exports

I think 'exports' is not a constant, since you can overwrite it. exports = "dog"; console.log(exports); It originally seems to be a non-constant reference to 'module.exports'; 'module.exports' is what you are interested in, so don't break the reference.

Jukka Pietarinen  May 02, 2020  May 13, 2020
Page 204
Last paragraph of 8.5 Functions as Namespaces

Appears "namesapce" instead of "namespace"

Oscar Fernandez Sierra  Jun 17, 2020