These are the known mistakes in the second edition of the book. For errata in the first edition, see this page. To report a problem that is not listed here, send me an email.
Issues whose section title is followed by a superscript ¹ were fixed after the first print of the book, and will not be present in later prints.
Page 4 (Why Language Matters¹): The sentence “You can probably imagine how how tedious…” duplicates the word how.
Page 159 (The Date Type¹):
findDate function produces the wrong months. The
second argument given to
new Date should
Number(match) - 1, subtracting one to compensate
for the fact that months start at zero in this interface.
Page 162 (Backtracking): The regular expression
should have another
+ sign after the
group to match what it is described as matching. The diagram for the
expression is similarly missing an arrow looping back around the
Page 185 (Slow-Loading Modules¹): In the code
define, the second use of
every method is incorrect. The call should be
Page 192 (Parsing¹): The example Egg program has its parentheses distributed incorrectly. One closing parentheses from the second line should be moved to the end of the last line.
Page 242 (Mouse Motion¹): The example
event.which to detect mouse button release. This
only works in Chrome and Safari. See
the updated code
and comment for a better
Page 281 (Curves¹): The text refers to
bezierCurve method. This method is actually
bezierCurveTo (as in the example code).
Page 282 (Curves¹): Where it says the picture shows a line from the left of the circle to the left of the quarter circle, it should definitely say right in both instances.
Page 312 (Summary¹): The code example uses
statusCode property. This does not exist, since the
property is actually called
Page 327 (Summary¹): “When the user has selected a field” should be “When the user has selected a file”.