Jump to content
Larry Ullman's Book Forums

Chapter 4, Two More Errata


Recommended Posts

Hi Larry,

 

Your book is great!I am reading it and practicing it.

 

Well, I think there is one small English language issue on Chapter 3, P81

 

"In a word, logical errors are bugs, commonly caused by the code doing exactly
what you told it to....."

 

I guess usually the phrase 'in a word' is just followed by a word, not a long sentence, right?

 

 

Alex

Link to comment
Share on other sites

Got it, thanks Larry.

 

As I am continuing reading Chapter 4, I found an additional '(' on P113:

 

"Thanks to the ability to chain object notation,
this could be reduced to one line:
if ( (document.getElementById(‘email’).value.length > 0) { ... "

 

This line of code has an extra opening parentheses before (document.getElementById...

Link to comment
Share on other sites

Also on P121:

 

-----

7. Add an event listener to the form:
function init() {
‘use strict’;
document.getElementById(‘calcForm’).onsubmit = formatNames;
} // End of init() function.

------

 

The code in Step 7 should actually refer to the element with an id value of theForm, which is what the corresponding downloadable code uses.

Link to comment
Share on other sites

 Share

×
×
  • Create New...