JavaScript: The Good Parts: The Good Parts 1st Edition
| Douglas Crockford (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative book scrapes away these bad features to reveal a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole—a subset you can use to create truly extensible and efficient code.
Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables.
When Java applets failed, JavaScript became the language of the Web by default, making its popularity almost completely independent of its qualities as a programming language. In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript, including:
- Syntax
- Objects
- Functions
- Inheritance
- Arrays
- Regular expressions
- Methods
- Style
- Beautiful features
The real beauty? As you move ahead with the subset of JavaScript that this book presents, you'll also sidestep the need to unlearn all the bad parts. Of course, if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book.
With JavaScript: The Good Parts, you'll discover a beautiful, elegant, lightweight and highly expressive language that lets you create effective code, whether you're managing object libraries or just trying to get Ajax to run fast. If you develop sites or applications for the Web, this book is an absolute must.
Frequently bought together
Customers who viewed this item also viewed
From the brand
-
O'Reilly Media
Your partner in learning
-
From the Publisher
From the Preface
This is a book about the JavaScript programming language. It is intended for programmers who, by happenstance or curiosity, are venturing into JavaScript for the first time. It is also intended for programmers who have been working with JavaScript at a novice level and are now ready for a more sophisticated relationship with the language. JavaScript is a surprisingly powerful language. Its presents some challenges, but being a small language, it is easily mastered.
My goal here is to help you to learn to think in JavaScript. I will show you the components of the language and start you on the process of discovering the ways those components can be put together. This is not a reference book. It is not exhaustive about the language and its quirks. It doesn't contain everything you'll ever need to know. That stuff you can easily find online. Instead, this book just contains the things that are really important.
This is not a book for beginners. Someday I hope to write a JavaScript: The First Parts book, but this is not that book. This is not a book about Ajax or web programming. The focus is exclusively on JavaScript, which is just one of the languages the web developer must master.
Editorial Reviews
About the Author
Douglas Crockford is a Senior JavaScript Architect at Yahoo!, well known for introducing and maintaining the JSON (JavaScript Object Notation) format. He's a regular speaker at conferences on advanced JavaScript topics, and serves on the ECMAScript committee.
Product details
- Publisher : O'Reilly Media; 1st edition (May 1, 2008)
- Language : English
- Paperback : 176 pages
- ISBN-10 : 0596517742
- ISBN-13 : 978-0596517748
- Item Weight : 10.2 ounces
- Dimensions : 7 x 0.38 x 9.19 inches
- Best Sellers Rank: #36,825 in Books (See Top 100 in Books)
- Customer Reviews:
About the author

Douglas Crockford is the author of How JavaScript Works. He has been called a JavaScript Guru, but he is more of a Mahatma. He was born in Frostbite Falls, Minnesota, but left when he was only six months old because it was just too damn cold. He has worked in learning systems, small business systems, office automation, games, interactive music, multimedia, location-based entertainment, social systems, and programming languages. He is the inventor of Tilton, the ugliest programming language that was not specifically designed to be an ugly programming language. He is best known for having discovered that there are good parts in JavaScript. That was the first important discovery of the Twenty First Century. He also discovered the JSON Data Interchange Format, the world’s most loved data format.
Customer reviews
Reviewed in the United States on July 17, 2019
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
Reviewed in the United States on July 17, 2019
I can't be sure, but my guess is that adhering to this book's practices has saved me many hours of frustration.
I also like the concrete advice: the parts of Javascript to use, the parts to discard, and the parts to beware of.
I also like the explanations: how and why the good parts work. But this is where I begin to have reservations about the book. Some of the explanations are incomprehensible because of poor editing. How is it possible that a collection of technology pace-setters (Crockford, O'Reilly, Amazon) can leave numerous "confirmed serious technical mistakes" in their work uncorrected for at least 4 years (I bought it in 2012)?
O'Reilly's errata website for this book lists 157 'confirmed' errata, of which 9 are classified as "Serious Technical Mistake." There are also 22 "unconfirmed errata." Most of the confirmed errata were marked as fixed shortly after publication, but at least one of them ("beget") is still in the Kindle edition. O'Reilly helpfully provides downloadable copies of the example code online, but the current version still contains errors that prevent the code from running (mode/node).
I keep going back and re-reading this book, so looking past all my wasted time trying to make sense of the errors, I would give a correctly edited edition of this book five stars for the educational insights sprinkled through it. Or maybe not any more. The state of the art has changed. For example, as many one-star reviewers point out, the whole section on Object.create is outdated. This book needs a rewrite.
This particular book is a godsend because Mr. Crockford does his very best to give clear explanations of how it works. He also comes clean and has appendixes that describe the "Awful Parts" and the "Ba Parts" of JavaScript. Given that this language is deeply flawed, it acts as a catharsis to any developer who has been living with the language for decades, silently wondering: "Is it just ME or does this language have lots of mistakes and defects in its design?" This book makes it clear: it's not me, it's YOU, JavaScript. Highly recommended.
I have a lot of experience developing production applications using C/C++ in the past. I started learning JavaScript and found it easy to get started with. The online tutorials do a good job of exposing the syntax and basic concepts. Javascript is not interpreted C/C++, I found that it more resembled LISP the way it was used. I was definitely confused by the language (what is with all this function within a function stuff?) and I wanted to understand how the language works (literally how it is implemented).
Douglas clarified the concepts for me and now I feel more confident understanding how to use JavaScript. Also, he points out some major pitfalls, e.g. understanding how Arrays work is key to using them.
This book is NOT for beginners to programming.
This book is very opinionated on what the core language constructs are and how to use them and avoid the other parts.
This book is small but quite dense. I must have re-read some sections 5-6 times along with gathering other sources and running through some online examples. Probably depends on your background and level of experience with JavaScript but the concepts were pretty new to me.
Chapters 4&5 really get to the meat of JavaScript.
The book is an excellent reference and recommend owning it if you want to do serious programming with JavaScript.
Also, you can find Crockford on youtube quite easily. I went through his excellent series here: https://www.youtube.com/watch?v=JxAXlJEmNMg&list=PL7664379246A246CB
Enjoy!
Update: Note: I have purchased 3 O'Reilly books in the last couple of months. Each one of them has literally fallen apart. I will be reading a page and the page will come out of the binding. I am fairly gentle on the books so I think there is a binding problem at O'Reilly.
Top reviews from other countries
This book was written in 2008 and probably needs updating. It’s hard going in places and the diagrams did little to nothing to help my understanding. I’ve come away still wondering about new and constructors, but I know I just need to review them again when I need them and it’ll get clearer. I’m still not sure which function declaration syntax is best, but I’m not sure it matters too much.
I bought this book and 2 others "Javascript the definitive guide" & "Javascript Patterns", as far as I am concerned these books are essential reading for any programmer!
These 3 books hold, the dubious honour, of being the only 3 programming books I have actually read cover to cover.
This book, is great, as I initally skim read this book over a lazy saturday afternoon, while drinking beer while sitting in sun lounger. Not something I often associate with tech books! I also watched some of the Douglas Crockfords videos on YouTube, which are great addendums, and a must.
I have re-read this book several times since, as I my journey into Javascript has progressed. The trilogy of javascript books has not left my Desktop, and I find myself refering to them time and again!
Douglas Crockfords style and approach to this book is just right! Easy to follow, and for a tech book a real page turner.









