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 |
---|---|---|---|---|---|
Safari Books Online | X Second live code example |
http://my.safaribooksonline.com/book/programming/javascript/9781449344412/2dot-working-with-objects-and-properties/host_objects_vs_native_objects_html Live Code <!DOCTYPE html><html lang="en"><body><script> for (x in window.document) { console.log(); } should be for (x in window.document) { console.log(x); } Note from the Author or Editor: |
David Abernethy | Dec 26, 2012 | |
Page 15-16 United States |
The console.log output (and the descriptive text and code comments) for the objects created using the constructor function indicates the RegEx constructor would be "function." Using Chrome or Safari on a Mac yields "object" as the result. I'm unsure if this is an error or simply an artifact of the Javascript implementations for those browsers. P.S. Loving the book...especially the Live Code to JSFiddle! Note from the Author or Editor: |
Bob Monsour | Jan 10, 2013 | ||
Page 18 second half of code example |
The book has: // logs "string string" console.log(primitiveString1.toString(), primitiveString2.toString()); // logs "number number" console.log(primitiveNumber1.toString(), primitiveNumber2.toString()); // logs "boolean boolean" console.log(primitiveBoolean1.toString(), primitiveBoolean2.toString()); The actual log outputs are "foo foo", "10 10", and "true true" respectively, not "string", "number", and "boolean". Perhaps I'm just reading the example wrong? Note from the Author or Editor: |
Michael Blyth | Jan 09, 2013 | ||
Page 23 United States |
The statement... console.log(typeof myRegExp); // logs function? WHAT? Be aware... This actually logs as an object in Chrome. This is similar to an earlier errata that I posted regarding a similar note. Note from the Author or Editor: |
Bob Monsour | Jan 10, 2013 | ||
Printed, PDF, ePub | Page 31 Code |
In the code snippet starting at p. 31, in the console.log() parts, myObject.myNull and myFunction.myNull are logged twice. Note from the Author or Editor: |
Demetris Kikizas | Jan 25, 2013 | |
Page 50 Code at top of page |
When I run the code using the Live Code link, JSFiddle doesn't open the console panel to show the result. I've run all of the code examples so far and this is the first one that has done it. I opened one of the other examples that does open the console panel and pasted the code in to verify the result. Strange... Note from the Author or Editor: |
Bob Monsour | Jan 11, 2013 | ||
Printed, PDF, ePub | Page 69 Live Code link at top of page |
The Live Code links starting on this page are using jsbin rather than jsfiddle. I was surprised and unsure if this is what you intended. Note from the Author or Editor: |
Bob Monsour | Jan 11, 2013 | |
Printed, PDF, ePub | Page 843 United Kingdom |
In the Kindle version (location 843, no page numbers!) the note reads "Keep in mind that, besides their own properties, instances can have properties inherited from the prototype chain. Or, as we just saw in the code, properties added to the constructor after instantiation. This highlights the dynamic nature of objects in JavaScript." I cannot see that this has been demonstrated at all at this point. Several related issues have been explained but there is not yet any example that shows an instance inheriting properties added to the constructor after instantiation. (If this has been demonstrated and I've missed it, this is perhaps not the right place for the note.) Note from the Author or Editor: |
William Hudson | May 16, 2013 | |
Printed, PDF, ePub | Page 1408 United Kingdom |
At location 1408 in Kindle, the comment for funcC mentions 'too.method()' for no apparent reason. Note from the Author or Editor: |
William Hudson | May 17, 2013 |