The Bottom Line
Each chapter has diagrams or code examples with extensive commentary for explanation. They chapters about grammar and syntax have numerous railroad diagrams, which are a quick way to describe legal syntax. The chapters about language semantics are filled with commented code samples and full "programs". The code samples build on each other throughout the chapter leaving the reader with a common thread on which to build.
The book is dense. I will definitely need to refer back to it and read the whole book or relevant sections again.
To Read or Not to Read
If you are looking for a Read/no-Read decision. Here is the bottom line:
- I liked the thorough explanations and examples.
If you want chapter by chapter summary, thoughts, and errors keep reading, otherwise you can stop here.
Chapter Overviews, Thoughts
The following sections are organized by chapter and include a basic summary of the content and thoughts on the content. The thoughts are in a bulleted list under the summary.
The preface covers basic info about the book, its goals, and the conventions used in the book.
Chapter 1: Good Parts
Chapter 2: Grammar
- I found the railroad diagrams helpful, but on their own without any commentary it takes quite a bit of time to understand. The author did a good job of walking the reader through each diagram so that it is not up to the reader to digest and understand the diagram.
Chapter 3: Objects
Chapter 4: Functions
Chapter 5: Inheritance
Chapter 6: Arrays
Chapter 7: Regular Expressions
Chapter 8: Methods
Chapter 9: Style
This chapter discusses how to write programs in a style that is easy to understand and maintain in the future. Again, this chapter isn't very deep but does have useful information.
Chapter 10: Beautiful Features
This chapter is more or less a summary goal of the book. It describes why you might be interested in eliminating features from a programming language.
Appendix A: Awful Parts
Appendix B: Bad Parts
Appendix C: JSLint
This appendix covers the authors JSLint implementation, how to use it and options.
- Running your JS code through JSLint will check for errors and good style. It will help you to eliminate the bad parts of JS and stick to the good parts. It will not ensure that your program works.
Appendix D: Syntax Diagrams
Appendix E: JSON
- JSON is fast becoming the data interchange format of choice among all types of programs. If you aren't familiar with it, I recommend that you start to learn it.