while and a
On being a Object Oriented language, it is possible to split responsabilities in objects and use important concepts of the Object Oriented world like encapsulation and inheritance. The book also gives a good overview on how prototypes work and how to use them to create objects based on other objects.
Functions as objects
The book explains the benefits of this property: cascading, currying, how to create a memoization mechanism, and callbacks. It also explains important concepts on functions: dealing with an arbitrary number of arguments, closures and how scopes in JS work.
Language downsides and JSLint
JSLint you can help you with this).
a = 1 expression, when
a was not declared turns
a it into a global variable, the
typeof behaviour for
NaN is strange (who would think that
typeof NaN is
Number), the weak-typing misleadings (
'1' + 1 being
'11') and the evil
== that does type coercion to both sides of the expression and end up doing nasty things like evaluation to true
'0' == false and
0 == false. The book goes through all these things and explains the problems with them.
One part that I think could be improved on this book is the API documentation or a big method overview . I think book pages are not the right place for an API documentation, as it is really boring to read and although you may learn a thing or another, the biggest part of it you end up reading and forgetting a few days later.
There is a chapter that goes through small set of methods of all the standard types: Strings, Arrays, Numbers, Regexps etc. It is really well written and contains good examples but I don't think a book telling the language good parts should do a method overview.