Errata

JavaScript Cookbook

Errata for JavaScript Cookbook, Second Edition

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
PDF, ePub, Mobi, Other Digital Version
Page 1
PRODUCT PAGE

(Unable to include links, so trying to describe using text only.)

On the "PRODUCT PAGE" of this book, at the O'Reilly website.
The link to "Download Example Code" is broken or outdated.

Can you fix the example code download link, please?

Cheers,
Samuel Tekrenius

Note from the Author or Editor:
The site is now fixed; you can get the code from

github.com/shelleyp/javascriptcookbook

Anonymous  Jan 29, 2019  Jan 29, 2019
PDF
Page 5
3rd line of the 3rd code block

The comment for the line:
var bool2 = new Boolean(true);
is the same as for the "bool1". I think it should be "Boolean object instance"

Note from the Author or Editor:
In first recipe, fifth code block, the comment for the line

var bool2 = new Boolean(true); // primitive boolean

Should read

var bool2 = new Boolean(true); // Boolean object instance

Victor  Aug 06, 2015 
ePub
Page 8
Last paragraph

Hi Team,

In the first section The World of JavaScript > (subsection) Part II, JavaScript, All Blown Up > (subseciton) Chapter 14, JavaScript Frameworks there is a paragraph about Web Components.

Within that paragraph there's a typo in the work proprietary: "I’m wary of replying on roprietary technology"

Cheers,
Tom

Note from the Author or Editor:
Fixed in working copy.

Anonymous  Feb 12, 2015 
Page 87
2nd whole paragraph

text reads "One can easily assign a value to that property outside the constructor function, and overwrite the private data:" When in fact, the code snippet reference will create a *new* publicly-accessible property called title, which is then publicly accessible. The private data is still in there, unaltered (as can be retrieved publicly using a getter function). This is a very minor point, but as someone trying to understand JavaScript to its core, I find items like this disturbing in their ability to mislead.

Note from the Author or Editor:
In recipe Keeping Member Objects Private, remove the following sections:

Be aware, though, that the privacy of the variable is somewhat illusory. One can easily assign a value to that property outside the constructor function, and overwrite the private data:
happySongs[0].title = 'testing';

console.log(happySongs[0].title); // testing

However, the “privacy” of the data isn’t meant to ensure security of the object. It’s a contract with the developer, a way of saying, “This data isn’t meant to be accessed directly, and doing so will probably mess up your application.” As such,

And capitalize "developers", so the sentence reads:

Developers also typically use a naming convention where private data members begin with an underscore, to highlight that they aren’t meant to be accessed or set directly.

Anonymous  Jun 21, 2015 
ePub
Page 110
Kindle ed., Chapt 14 synopsis

Typo: "... replying on roprietery technology ..."

Note from the Author or Editor:
In the preface, change the following sentence fragment from:

"...I’m wary of replying on roprietary technology when learning about something new"

to

"...I’m wary of relying on proprietary technology when learning about something new"

Peter Davis  Apr 12, 2015 
PDF
Page 337
last line of text on this page

Please change "imminently" to "eminently" in the phrase "...but it is imminently readable."

Note from the Author or Editor:
Please find and change "imminently" to "eminently" in book.

Dan Fauxsmith  May 13, 2015 
PDF
Page 469
next-to-last line on the page

Please change "...modifying uploading images,..." to "...modifying uploaded images,..."

Note from the Author or Editor:
In Chapter 16, intro text, modify last line to change uploading to uploaded.

O'Reilly Media
 
May 14, 2015