Page 20: The line that reads:
The call to msg.endsWith("o", 8) starts the search
from index 0 and searches up to index 7, which is the o in world.
Should read:
The call to msg.endsWith("o", 8) starts the search
from index 7 (the second argument minus the length of the first argument), which is the o in world.
Page 25: The ECMAScript wiki weblink in the first paragrah under "Template Literals" should be: https://web.archive.org/web/20170114115928/http://wiki.ecmascript.org/doku.php?id=harmony:quasis
Page 77: The phrase "in ECMAScript 5" should be removed from the following sentence:
"For example, to override a method on an object instance so it also calls the prototype method of the same name, you’d do the following in ECMAScript 5:"
Page 136: In the summary, it says sets and maps are "unordered", but it should actually say sets and maps are "ordered."
Page 143: The line that reads: A for-of loop calls next() on an iterable each time the loop executes and stores the value from the result object in a variable.
Should read:
A for-of loop works on an iterable and uses its Symbol.iterator property to retrieve an iterator. Then, the for-of loop calls next() on that iterator each time the loop executes and stores the value from the result object in a variable.
Page 150: The two instances of "double-byte" in the first and second paragraphs should instead say "surrogate pair".
The two instances of "Unicode" in the second and last paragraphs should instead say "surrogate pair".
Page 151: In the last paragraph, the third sentence says that “All values are read from the iterator and inserted into the array in the order in which values where returned from the iterator.” It should read “All values are read from the iterator and inserted into the array in the order in which values were returned from the iterator.”
Page 166: The line that reads: In this code, PersonType is a constructor function that creates a single property called name.
Should read: The line that reads: In this code, PersonType is a constructor function that creates an instance with a single property called name.
Page 173: "innerHTML method" in the second paragraph should be "innerHTML principle"
Page 185: The last line that reads:
Behind the scenes, the Symbol.species property is actually making this change.
Should be: However, the constructor for the return value is read from, the Symbol.species property, allowing for this change.
Page 220: There is a missing semicolon in the code. Changes are marked with #Changed below:
setTimeout(function() {
console.log("Timeout");
+}, 500); #Changed
console.log("Hi!");