Errata

You Don't Know JS: Types & Grammar

Errata for You Don't Know JS: Types & Grammar

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page 9
IIFE code snippet in middle of page

FeatureXYZ() is defined at the top of the IIFE, shadowing any other declaration, so the check for it in doSomethingCool() will never fail, and the user's definition, if any, will always be replaced.

Anonymous  Nov 16, 2017 
PDF Page 94
The code block in the middle

var a = 42;
var b = "abc";
var c;
var d = null;

//...

if ((a && d) || c) {
console.log( "yep" ); // yep
}

In the last block, the comment "// yep" implies that the message will be printed to the console, but, the condition inside the "if" statement is false, so the line won;t be printed

John Kapantzakis  Jul 09, 2019