Book: JavaScript, The Good Parts

February 5, 2010

JavaScript: The Good Parts by Douglas Crockford is essential if you do any development using JavaScript.

It's a small book, quickly read, but it contains invaluable advice on which parts of the language are safe to use and which should be avoided at all costs.

The book starts with a detailed grammar of the JavaScript language and then goes on to have chapters on Objects, Functions, Inheritance, Arrays, Regular Expressions and Methods. Chapter 9 covers Coding Style, including details of why you should not match indentation for curly braces.

Appendixes A and B were the most valuable to me, covering the Awful and Bad parts of the language. This lists the bad choices made during the language design, and alternatives you should use when avoiding these dark corners.

Recommended for anyone writing JavaScript code.

Tags: book javascript