Errata
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 |
---|---|---|---|---|---|
Bitwise Operators (Chapter 5) |
The const declarations for the Unix-style file permissions are missing the equals signs. Also their values are wrong: the correct values are 4 for read, 2 for write and 1 for execute. Note from the Author or Editor: |
Demetrios Biskinis | Feb 20, 2016 | Apr 15, 2016 | |
Bitwise Operators (Chapter 5) |
Testing for multiple flags requires a more complicated expression. Instead of Note from the Author or Editor: |
Demetrios Biskinis | Feb 20, 2016 | Apr 15, 2016 | |
Assignment Operators (Chapter 5) |
In while loop, instead of using a comma in the condition use &&. Also, the interpolated expression in the last message is incorrect. See below: Note from the Author or Editor: |
Demetrios Biskinis | Feb 20, 2016 | Apr 15, 2016 | |
Third code example on The Error Object page |
In The Error Object example, the console.error message is missing the closing backtick. Note from the Author or Editor: |
Norm Morrison | Apr 29, 2016 | May 13, 2016 | |
ePub |
2nd paragraph. Just after the 'note' |
'Vary' should be 'verify'. Note from the Author or Editor: |
Leon Webster | Jun 13, 2016 | Jun 19, 2018 |
Printed | Page xxi first line, 3rd paragraph |
"...readers of of my previous book..." should be only one "of" Note from the Author or Editor: |
Anonymous | Sep 09, 2016 | Jun 19, 2018 |
Mobi | Page i Preface, 2nd paragraph, 3rd sentence |
Sentence begins "ES6 was developed quickly...." then goes on to state that Brenden Eich admits to getting a few things wrong "the first time". The sentence is referring to the first release of JavaScript, not ECMAScript 6. Sentence should begin "JavaScript was developed quickly..." Note from the Author or Editor: |
Anonymous | Sep 13, 2016 | Jun 19, 2018 |
137 |
this snippet doesn't work properly Note from the Author or Editor: |
Anonymous | Jul 12, 2017 | Jun 19, 2018 | |
Chapter 4 3rd paragraph in “Additional for Loop Patterns” |
“In this for loop, the condition will simply evaluate to undefined, which is falsy, meaning the loop will never have cause to exit.” Note from the Author or Editor: |
Adrian Hempel | Nov 23, 2017 | Jun 19, 2018 | |
ePub |
The Transcompilers Section. |
Not truly a mistake on your part, but the Babel Transcompiler has evidently changed with a recent upgrade. Note from the Author or Editor: |
Tim Mitchell | Dec 19, 2015 | Apr 15, 2016 |
Table 5-7 Row 4 |
Bitwise XOR And Bitwise NOT both list "^" as their operator. Bitwise NOT needs to update to "~" (like in the example) |
Anonymous | Dec 22, 2015 | Feb 12, 2016 | |
Before Table 5-10 Note |
"Array destructuring doesn't only work on arrays: it works on any iteralbe" -> "iterable" |
Anonymous | Dec 22, 2015 | Feb 12, 2016 | |
Before Table 5-10 After the note |
"In these simple exmaples" -> "examples" |
Anonymous | Dec 22, 2015 | Feb 12, 2016 | |
NA 3rd example under the headline "Variable Masking", Chapter 7 "Scope" |
Says: Note from the Author or Editor: |
Anonymous | Feb 15, 2016 | Apr 15, 2016 | |
Chapter 8, "Arrays and Array Processing", 1st example under "Adding or Removing Single Elements at the Beginning or End" |
Says: Note from the Author or Editor: |
Anonymous | Feb 15, 2016 | Apr 15, 2016 | |
Chapter 8, "Arrays and Array Processing", 1st example under "Adding or Removing Elements At any Position" |
Says: Note from the Author or Editor: |
Anonymous | Feb 15, 2016 | Apr 15, 2016 | |
Page 17 First line |
The “compatibility table” link is bad. Note from the Author or Editor: |
Jim Syler | Oct 21, 2023 | ||
Page 23 3rd paragraph |
I'm not sure whether it makes a difference, but the Gulp documentation states that you should install gulp-cli, not gulp, globally: Note from the Author or Editor: |
Anonymous | Apr 05, 2017 | Jun 19, 2018 | |
Printed | Page 23 inset at bottom of page |
Linux/OSX instruction says "sudo install -g gulp"; should be "sudo npm install -g gulp" Note from the Author or Editor: |
Michael Tobis | Feb 15, 2018 | Jun 19, 2018 |
ePub | Page 26 Source Code |
Not an error, but it may help future readers to have the use of the backticks/grave accents explicitly pointed out for `{subject} {verb} {object}`. Due to my lack of critical examination of the code (my bad), I didn't realize why my ES6 test code was not working until I got to chapter 2. Note from the Author or Editor: |
Anonymous | Apr 24, 2016 | May 13, 2016 |
Page 28 Top of the page |
The questions to the ESLint init have changed. I have installed version 2.5.1. Note from the Author or Editor: |
Jim Wiedman | Mar 27, 2016 | Apr 15, 2016 | |
Printed | Page 28 3rd paragraph |
'pouplar' should be 'pouplar' Note from the Author or Editor: |
Brian van den Broek | Apr 22, 2017 | Jun 19, 2018 |
ePub | Page 37-38 second paragraph |
The instructions to run " npm init " are lost In the following paragraph: Note from the Author or Editor: |
Guido | Mar 20, 2016 | Apr 15, 2016 |
ePub | Page 38-39 second to last paragraph |
The instruction to install gulp locally is lost in the following paragraph: Note from the Author or Editor: |
Guido | Mar 20, 2016 | Apr 15, 2016 |
Page 46 After second paragraph of Objects section |
The line ' obj.color; ' should probably be ' obj.color = "yellow" ' in order to match the commented result value of "yellow" since the color property isn't initialized to that value. Note from the Author or Editor: |
Anonymous | May 05, 2016 | May 13, 2016 | |
Page 47 Object example "sam3". |
"subfaimily" in the object sam3 classification should be "subfamily". Note from the Author or Editor: |
Dercilio Alves Fontes | Apr 13, 2018 | Jun 19, 2018 | |
Page 48 top of page |
sam3.classification.family; // "Felinae" Note from the Author or Editor: |
Anonymous | Apr 01, 2016 | Apr 15, 2016 | |
ePub | Page 54 1st paragraph |
“From here on out, when you install local packages, you should add either the --save or --saveDev flag" Note from the Author or Editor: |
Anonymous | Feb 01, 2016 | Apr 15, 2016 |
ePub | Page 56 last paragraph |
says |
Terry Bush | Jan 22, 2016 | Feb 12, 2016 |
Printed, PDF, ePub | Page 59 while loops |
Condition = funds > 1. Note from the Author or Editor: |
Anonymous | Jul 03, 2016 | Jun 19, 2018 |
Page 82 unary plus example |
const p1 = -x1*1; Note from the Author or Editor: |
Dercilio Alves Fontes | Apr 18, 2018 | Jun 19, 2018 | |
Page 83 first paragraph |
In "For example, 10 % 3.6 will be 3 (3.6 goes into 10 twice, with 2.8 left over).", the first expression should be "10 % 3.6 will be 2.8". Note from the Author or Editor: |
Dercilio Alves Fontes | Apr 18, 2018 | Jun 19, 2018 | |
Page 91 Paragraph with "The second line ..." |
"The second line in that example ..." should be "The third line in that example ...". Note from the Author or Editor: |
Dercilio Fontes | Apr 21, 2018 | Jun 19, 2018 | |
Page 101 First paragraph of conclusion |
"basic building blacks" should be "building blocks" Note from the Author or Editor: |
Anonymous | May 09, 2016 | May 13, 2016 | |
Printed, PDF, ePub | Page 105 Top of page - array description |
After changing arr[1] the text describes the array as: Note from the Author or Editor: |
Anonymous | Jul 03, 2016 | Jun 19, 2018 |
Page 118 Last line on page |
"aways" should be "always" Note from the Author or Editor: |
Anonymous | May 11, 2016 | Jun 19, 2018 | |
Printed | Page 118 2nd Example, roughly middle of page |
Example is putting user information in a single object: Note from the Author or Editor: |
Brandon Anderson | Jan 28, 2017 | Jun 19, 2018 |
PDF, ePub | Page 119 the example discussed at the end of the section "Lexical Versus Dynamic Scoping" |
According to the text, the second invocation of console.log in function f should cause a crash, because y, the argument passed to console.log, isn't in scope inside the body of f. Note from the Author or Editor: |
rhanneken | Mar 14, 2016 | Apr 15, 2016 |
Printed | Page 119 1st code snippet |
I get NO error when running the following code snippet even though the comment in the book says I should: Note from the Author or Editor: |
Anonymous | Sep 20, 2016 | Jun 19, 2018 |
Printed | Page 123 First code example under "Function Scope and Hoisting" |
The example: Note from the Author or Editor: |
Dylan Zwick | Nov 28, 2017 | Jun 19, 2018 |
Printed | Page 123 Second paragraph under "Function Scope and Hoisting" |
What is the world does the sentence: "When you declare a variable with var, it's available everywhere in the current scope.. even before it's declared." even mean?!? That's an almost comically confusing sentence. When you declare a variable with var is that variable not yet declared? Note from the Author or Editor: |
Dylan Zwick | Nov 28, 2017 | Jun 19, 2018 |
Page 125 Second code example |
"undefinedVar" in the code example is a different name than the variable "notDefined" stated in the comment Note from the Author or Editor: |
Anonymous | May 11, 2016 | Jun 19, 2018 | |
Printed | Page 129 Second paragraph |
After pointing out that JS arrays can be nonhomogeneous, it is claimed that "it follows from this that arrays can have other arrays as elements". It does not follow. Note from the Author or Editor: |
Brian van den Broek | Apr 23, 2017 | Jun 19, 2018 |
Page 131 Example: array literals |
const arr4 = [ Note from the Author or Editor: |
Dercilio Alves Fontes | May 16, 2018 | Jun 19, 2018 | |
Printed | Page 132 Fourth sentence |
In "up to the end of the string", 'string' should be 'array'. Note from the Author or Editor: |
Brian van den Broek | Apr 23, 2017 | Jun 19, 2018 |
Page 133 Tip at the bottom of the page |
The tip states that the k words would be in their original order. However, according to the documentation on MDN sort isn't necessarily stable. Hence isn't the order of k words undefined? Note from the Author or Editor: |
Anonymous | Apr 16, 2017 | Jun 19, 2018 | |
Page 135 Last paragraph |
The text states that find returns null, if no element was found, but it actually returns undefined. Note from the Author or Editor: |
Anonymous | Apr 16, 2017 | Jun 19, 2018 | |
Printed | Page 136 3rd paragraph |
Sentence is "find and findIndex are great if you're looking for the index of an element." Note from the Author or Editor: |
Anonymous | Feb 13, 2017 | Jun 19, 2018 |
Printed | Page 136 3rd paragraph |
"Does your array contain functions and you need promises?" As promises have yet to be introduced at this point, the example is not well chosen. Note from the Author or Editor: |
Brian van den Broek | Apr 23, 2017 | Jun 19, 2018 |
Printed | Page 138 2nd code snipped, last line |
names.map(String.toLowerCase) results in error: Note from the Author or Editor: |
Anonymous | Sep 20, 2016 | Jun 19, 2018 |
Page 139 Last paragraph |
' "A", "J", "Q", and "Q" ' should be ' "A", "J", "Q", and "K" ' Note from the Author or Editor: |
Anonymous | Jun 28, 2016 | Jun 19, 2018 | |
Page 140 Numerous |
Multiple mentions of callback, but it's a concept not introduced until page 200. Either a forward reference or some other clarification is needed. Note from the Author or Editor: |
Dario Strbenac | Jun 01, 2016 | Jun 19, 2018 | |
Printed | Page 148 1st code snippet |
The fourth property, SYM, is not logged out in the For..In loop below. Why not? Is that expected? Thanks in advance. Note from the Author or Editor: |
Anonymous | Sep 20, 2016 | Jun 19, 2018 |
Printed | Page 149 last code listing |
In the set definition: Note from the Author or Editor: |
David Powers | Jul 19, 2016 | Jun 19, 2018 |
Printed | Page 151 last paragraph of code |
The code example says: Note from the Author or Editor: |
Ron Itelman | May 26, 2016 | Jun 19, 2018 |
Printed | Page 159 Last sentence of Chapter 9, section "Enumerating Object Properties, Revisited" |
"... using Object.keys, which includes only properties defined on the prototype." Note from the Author or Editor: |
Chris Janicki | Aug 13, 2017 | Jun 19, 2018 |
Page 160 |
InsurancePolicy class definition is followed by parentheses: Note from the Author or Editor: |
Eduardo Hernandez | May 03, 2018 | Jun 19, 2018 | |
Page 175 Second last line |
"... done, which becomes false after you read the last page." should use true instead of false. It currently contradicts the example of page 176. Note from the Author or Editor: |
Dario Strbenac | Jun 01, 2016 | Jun 19, 2018 | |
Page 182 const it = count() |
Chapter 12, generators and return, p182 Note from the Author or Editor: |
Anonymous | May 11, 2016 | Jun 19, 2018 | |
Printed | Page 182 Both code samples (and the ones on the next two pages, as well) |
The top level if clause of the function uses '!==' while the nested if clauses use '!='. There is no reason for the difference given, and, as far as I can tell, it does not really make a difference. But, isn't it suboptimal style to switch between the two different inequality tests in a single context where each test is serving a very similar role? Note from the Author or Editor: |
Brian van den Broek | Apr 24, 2017 | Jun 19, 2018 |
Printed | Page 189 Second paragraph |
"this section is something beginners often struggle with" Note from the Author or Editor: |
Brian van den Broek | Apr 25, 2017 | Jun 19, 2018 |
Page 190 1st code snippet, 2nd code snippet, code snippet in the Figure 13-1 |
There is an error in the code. Note from the Author or Editor: |
Vitaliya Alisauskaite | Mar 04, 2018 | Jun 19, 2018 | |
Page 197 code snippet, recursive function calculating factorial |
current version: Note from the Author or Editor: |
Vitaliya Alisauskaite | Mar 04, 2018 | Jun 19, 2018 | |
ePub | Page 205 2nd paragraph. Just after the 'note' |
'Vary' should be 'verify'. Note from the Author or Editor: |
Leon Webster | Jun 13, 2016 | Jun 19, 2018 |
Page 214 1st paragraph |
First paragraph refers to chapter 6 "As you learned in Chapter 6, generators that call yield" but it was in Chapter 12 not 6. Note from the Author or Editor: |
Eduardo Hernandez | May 13, 2018 | Jun 19, 2018 | |
Printed | Page 215 Final paragraph |
"If your only programming experience is with languages that have synchronous semantics, learning synchronous programming the JavaScript way can be daunting..." Note from the Author or Editor: |
David Powers | Jul 19, 2016 | Jun 19, 2018 |
ePub | Page 219 1st paragraph |
"Unless you are on UTC (hello, Timbuktu, Madrid, and Greenwich!)," Note from the Author or Editor: |
Inaki Rodriguez Carasa | Mar 16, 2016 | Apr 15, 2016 |
Printed | Page 222 Last line of code listing |
The final line of code uses toLocaleFormat(), which is a nonstandard method of the Date object that requires a format string. No format string has been supplied as an argument, so this wouldn't work even if the method is supported by the browser. Note from the Author or Editor: |
David Powers | Jul 19, 2016 | Jun 19, 2018 |
Page 223 7 paragraph Transmitting Dates |
after.d instdanceof date // false Note from the Author or Editor: |
Anonymous | May 24, 2016 | Jun 19, 2018 | |
Page 223 code on Transmitting Dates |
const before = { d: new Date() }; Note from the Author or Editor: |
Anonymous | May 24, 2016 | Jun 19, 2018 | |
Printed | Page 223 First line of code |
Time is wrong. The offset from UTC is -7 hours, so Note from the Author or Editor: |
David Powers | Jul 19, 2016 | Jun 19, 2018 |
Printed | Page 223-4 Date Components code example |
The example uses a date in October 1815, and displays the results someone would see in Los Angeles. I can't test this myself because I'm based in London. However, d.getHours() shows the result as 17, which indicates that JavaScript is assuming a -7 hour offset from UTC. Note from the Author or Editor: |
David Powers | Jul 19, 2016 | Jun 19, 2018 |
ePub | Page 228 3rd paragraph |
"const x = 3800.5; Note from the Author or Editor: |
Inaki Rodriguez Carasa | Mar 16, 2016 | Apr 15, 2016 |
Printed | Page 237 Penultimate paragraph |
We'll start with a simple example--replacing all four-letter words. Note from the Author or Editor: |
David Powers | Jul 20, 2016 | Jun 19, 2018 |
Page 247 1st code example in section "Backreferences" |
Non-capturing groups don't seem to work for the example, so that the regular expression should rather be /([A-Z])([A-Z])\2\1/g. Note from the Author or Editor: |
Anonymous | Apr 22, 2017 | Jun 19, 2018 | |
Printed | Page 248 Final paragraph |
The backtick and single straight quote following the dollar sign have been replaced in the descriptive text with a left and right curly quote respectively. Note from the Author or Editor: |
David Powers | Jul 20, 2016 | Jun 19, 2018 |
Page 265 Middle |
The text explains "We’ve called our data attributes action and contains ...", however the code uses containing. Note from the Author or Editor: |
Dario Strbenac | Jun 01, 2016 | Jun 19, 2018 | |
Printed | Page 282 General note |
The note after the code listing says "The exports shorthand only works for exporting objects; if you want to export a function or some other value, you must use module.exports." Note from the Author or Editor: |
David Powers | Jul 24, 2016 | Jun 19, 2018 |
Page 286 Table 20-2 |
Description of URL module should read "URL parsing utilities" instead of "URL prasing utilities". Note from the Author or Editor: |
Anonymous | Jul 05, 2016 | Jun 19, 2018 | |
Printed | Page 295 last paragraph |
The second sentence in the final paragraph on page 295 refers to the ServerRequest object (often abbreviated res), but later references in the same paragraph call it the ServerResponse object. Since res is a more likely abbreviation of ServerResponse than ServerRequest, should the first reference also be ServerResponse? Note from the Author or Editor: |
David Powers | Jul 24, 2016 | Jun 19, 2018 |
Page 304 We’ll add name and greet properties to obj: [...] |
Object.defineProperty(obj, 'color', { Note from the Author or Editor: |
Anonymous | Jun 28, 2016 | Jun 19, 2018 | |
Page 305 Lastly, there is also a Object.defineProperties (note the plural) .... |
object.defineProperties(object, descriptors) Note from the Author or Editor: |
Anonymous | Jun 28, 2016 | Jun 19, 2018 | |
Page 307 code: Object.isExtensible(log2); |
Object.isExtensible(log2); // true Note from the Author or Editor: |
Anonymous | Jun 29, 2016 | Jun 19, 2018 | |
Mobi | Page 827 Linting |
.eslintrc file => . eslintrc.js file Note from the Author or Editor: |
kamimura | Jun 30, 2016 | Jun 19, 2018 |
Mobi | Page 2869 1st paragraph |
Mobi location 2869 Note from the Author or Editor: |
Anonymous | Sep 23, 2016 | Jun 19, 2018 |