Practical Modern JavaScript

Errata for Practical Modern JavaScript

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
Safari Books Online Preface I
1st paragraph

The preface begins "Back in 1988, when I was using FrontPage...". Surely, that was 1998? I don't think anyone was using FrontPage in 1988.

Anonymous  May 23, 2017 
Safari Books Online 6.1.3
First Code Sample

const validations = new Map() const validator = { set(target, key, value) { if (validations.has(key)) { return validations[key](value) } return Reflect.set(target, key, value) } } validations is an es6 Map so return validations[key](value) is an error. It should be return validations.get(key)(value)

Mark Meyer  Oct 12, 2017 
Printed Page 10
Last code segment

Assume npm install babel-preset-env@6 --save-dev should be: npm install babel-preset-env@1 --save-dev as the printed version results in: Narnia:babel-setup will$ npm install babel-preset-env@6 --save-dev npm ERR! code ETARGET npm ERR! notarget No matching version found for babel-preset-env@6 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

Paul Williams  Aug 20, 2017 
Printed Page 10
last code section

babel-cli v6 installs as described, but babel-preset-env is no longer available with the transition to v7. I had to change the packages from printed: npm install babel-cli@6 --save-dev npm install babel-preset-env@6 --save-dev to this: npm install @babel/core --save-dev npm install @babel/cli --save-dev npm install @babel/preset-env --save-dev order to get the babel-cli installed and transpiling the first example.js successfully.

Aiden Joyce  Sep 29, 2018 
PDF Page 21
npm install eslint@3 --save-dev

Two UNMET PEER DEPENDENCY error messages for installing eslint.

Ken Penn  Apr 19, 2017