The book is part of a series called You Don’t Know JS which is intended to explore the more esoteric parts of the language.
For the positives, the book is very well written. It was an easy read and the author explains the concepts he is covering very clearly. I feel that he uses the right amount of repetition to explain a subject without going overboard.
I have a pet peeve in that most tutorials or coding books in the market use really trite, overly simplistic examples. For example, how many of you have seen the “Calculator” tutorial when learning about TDD? It drives me nuts because it in NO WAY teaches you anything useful. I understand you’re not going to build a CMS from scratch or whatever, but something a little better than an adding function would be nice.
I am pleased to report that the author does use meaningful examples that you are likely to encounter in your work. Yes, he does use some trivial examples, but he uses them in a way that shows you the concept in code and then follows it up with a real example. I like this very much and it scored a lot of points with me.
With a sound foundation in Compiler theory, he then moves into Lexical Scope and Scope in general. He maintains his style of explaining ideas in a clear way and follows up with nice examples.
He springboards from scope to Hoisting and then finally to Scope Closure. It may seem odd at first glance that he saved Scope Closure to the end, but it makes perfect sense after reading the book. When I was reading the last section on Scope Closure, it felt like the entire book was leading up to that. In some coding books, I feel like you can skip entire chapters and not suffer for it, with this book however, that is not the case. Every chapter serves a purpose and contributes to the rest of the book.
In terms of negatives, there really isn’t anything bad about the book. There were a few instances where the grammar needed some more editing. By this I mean that there were a few awkward sentences which required me to read it repeatedly.
The negatives are minor however and don’t take anything away from the book. A few grammar quibbles from a grammar Nazi like myself shouldn’t be enough to dissuade you from buying this book.