JavaScript: The Good Parts
176 pages
English
PDF
4.5

JavaScript: The Good Parts

JavaScript: The Good Parts

Author:

Year:

Summary:

Introduction

The book "JavaScript: The Good Parts" was published in 2008, but it still remains one of the most cited and respected books on JavaScript. Its author is Douglas Crockford, a legendary developer who introduced the JSON format and popularized many concepts of clean code in JS. This book is not a tutorial for beginners, but rather a philosophical manifesto that teaches you to distinguish the language's diamonds from its "garbage".

What the book is about

Crockford takes the liberty of cutting away everything superfluous that has accumulated in JavaScript over the years of its evolution. He highlights the "good parts" of the language: functions as first-class objects, closures, prototypal inheritance, object and array literals. At the same time, the author ruthlessly criticizes global variables, the with statement, outdated constructs like eval, and many other "bad parts" that lead to bugs and unreadable code.

The book consists of 10 chapters, each dedicated to a specific topic: from basic types and functions to inheritance, regular expressions, and coding style. At the end, there is an "Appendix" with a brief reference on grammar and methods.

Who this book is for

The book is intended for programmers already familiar with JavaScript at least at a basic level. If you are just starting out, it's better to first read a simpler tutorial and then return to Crockford. The ideal reader is a developer who writes in JS but feels that their code could be cleaner, more reliable, and more elegant.

What the reader will learn

  • How to distinguish good constructs from bad ones — the author provides clear criteria: safety, readability, predictability.
  • Functional programming in JS — closures, currying, memoization.
  • Prototypal inheritance — how to properly build object hierarchies without classes (before ES6).
  • Working with this — one of the most confusing topics, broken down clearly.
  • Regular expressions — a compact but very useful section.
  • Code style and refactoring — how to write self-documenting code.

Strengths

1. Conciseness and depth. The book is very thin (176 pages), but every sentence carries meaning. Crockford doesn't spell out the obvious but gets straight to the point.

2. Critical perspective. The author is not afraid to call things by their name: "this function is dangerous", "this pattern is outdated". This helps develop a healthy skepticism towards tools.

3. Practical examples. The code in the book is minimalist but illustrates exactly the concepts needed in practice.

4. Influence on the community. Many of Crockford's ideas (for example, using strict mode, preferring === over ==) have become generally accepted standards.

Who it is recommended for

The book is a must-read for everyone who writes in JavaScript — from frontend developers to backend engineers on Node.js. It will also be useful for those transitioning to JS from other languages (Java, C#, Python) and wanting to understand its unique philosophy. If you have already read "You Don’t Know JS" or "Eloquent JavaScript", this book will be an excellent addition — it offers a different, stricter perspective.

Important: the book does not cover modern ES6+ features (arrow functions, classes, promises), but understanding the "good parts" from 2008 lays the foundation on which it is easy to build modern code.

In summary: "JavaScript: The Good Parts" is a classic that has not become outdated. After reading it, you will stop writing "whatever works" and start writing "the right way".

Recommendations