![Amazon prime logo](https://m.media-amazon.com/images/G/01/marketing/prime/new_prime_logo_RGB_blue._CB426090081_.png)
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
-55% $13.37$13.37
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$8.75$8.75
Ships from: Amazon Sold by: Zoom Books Company
![Kindle app logo image](https://m.media-amazon.com/images/G/01/kindle/app/kindle-app-logo._CB668847749_.png)
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
JavaScript: The Good Parts: The Good Parts 1st Edition
Purchase options and add-ons
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.
- ISBN-100764363778
- ISBN-13978-0143429036
- Edition1st
- PublisherYahoo Press
- Publication dateJune 3, 2008
- LanguageEnglish
- Dimensions7 x 0.38 x 9.19 inches
- Print length172 pages
Frequently bought together
![JavaScript: The Good Parts: The Good Parts](https://images-na.ssl-images-amazon.com/images/I/7185IMvz88L._AC_UL116_SR116,116_.jpg)
Customers who viewed this item also viewed
From the brand
![oreilly](https://m.media-amazon.com/images/S/aplus-media-library-service-media/8b8bd701-63f1-4273-972d-9bc912c8596f.__CR0,0,1464,625_PT0_SX1464_V1___.jpg)
-
Explore JavaScript resources
-
Explore TypeScript
-
More from O'Reilly
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
From the Publisher
![](https://m.media-amazon.com/images/S/aplus-media/vc/16f658b0-46cd-4d9f-bc93-c8a9b8eb7098._SL300__.png)
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
- ASIN : 0596517742
- Publisher : Yahoo Press; 1st edition (June 3, 2008)
- Language : English
- Paperback : 172 pages
- ISBN-10 : 0764363778
- ISBN-13 : 978-0143429036
- Item Weight : 8.6 ounces
- Dimensions : 7 x 0.38 x 9.19 inches
- Best Sellers Rank: #292,096 in Books (See Top 100 in Books)
- #57 in JavaScript Programming (Books)
- #293 in Software Development (Books)
- #357 in Internet & Telecommunications
- Customer Reviews:
About the author
![Douglas Crockford](https://m.media-amazon.com/images/I/A1yTSClLRPL._SY600_.jpg)
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
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book concise and straightforward, providing direct examples and useful JavaScript knowledge. They find it easy to follow and understand, with clear explanations and examples that are approachable. Readers appreciate the good parts of JavaScript, highlighting the good ones and some bad ones as well. The content is described as dense and informative, though some feel the code is dated.
AI-generated from the text of customer reviews
Customers find the book concise and straightforward. They say it's best for programmers with a firm background in JavaScript at an intermediate level. The content is direct and high on information, but short on fluff. Readers appreciate the author's philosophy and Kindle version.
"...programming experience that wants to know the best way to create and use objects, arrays, types, etc...." Read more
"...all, however it is comforting to have a reference at hand that can give you examples and a brief summation (other than MDN) to help you with your..." Read more
"...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..." Read more
"...This book is most effective when studied by a programmer that is familiar with JavaScript at an intermediate level (or higher), or a programmer that..." Read more
Customers find the book's Javascript knowledge useful. They say it provides concrete advice on using and discarding parts of the language. The book is described as a great read for programmers who want to dive into JavaScript. It covers all the power of JavaScript in just 150 pages, making it a must-read for any JS dev.
"...This book is aimed at someone with intermediate programming experience that wants to know the best way to create and use objects, arrays, types, etc...." Read more
"...It is more a meta-JavaScript guide of style, pointing out features and usage not available elsewhere, except perhaps at his website, "Douglas..." Read more
"The book arrived as clean as you'd expect. Crockford did a pretty nice job of factoring out the best features of JavaScript. Damn good job!" Read more
"...It is NOT a book on web programming. It will NOT teach you anything about HTML, or the DOM, or how to put little fiddlly-bits on the screen, or how..." Read more
Customers find the book easy to understand and follow. They appreciate the clear explanations and examples that make it straightforward to learn JavaScript. The book's organization is straightforward, making it easy to look up specific features you want to know more about. Readers say it contains many key techniques for programming in Javascript, learned from years of unique experience.
"...It is a book on the constructs of Javascript, plain and simple...." Read more
"...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...." Read more
"...These were a bit cryptic at first, but easy to decipher after some study...." Read more
"...Crockford's writing is personable and clear, and the book's organization is straightforward. Here's my chapter-by-chapter breakdown...." Read more
Customers find the book has good parts. They mention it's easy to understand, with enough good parts to make it workable. The book has many patterns and components, making learning all of them at once challenging.
"This book has some good parts, even some great parts...." Read more
"...JavaScript: The Good Parts" is really about the good parts, for the most of it, and best suited for a reader with a firm background in object-..." Read more
"...It's also the best way to write plain vanilla javascript: using only the good parts...." Read more
"...is that it teaches you, that JavaScript has many patterns and many components, and learning all of them at once is not necessary...." Read more
Customers find the book's content dense, compact, and informative. They say it's thin at first but gets thick quickly.
"...If that has no meaning for you, skip this item. Like K & R, it's thin but gets dense quickly. This is for a serious developer...." Read more
"...The book is pretty short, but it's also dense...." Read more
"This book is, as other reviewers have said, very dense with functional and technical concepts...." Read more
"...Despite its dense and compact content, it is well worth the read. It may be required to go through it more than once to fully grasp the concepts...." Read more
Customers appreciate the book's design. They find it elegant and simple, using good JavaScript. However, some readers feel the design is strange and the book doesn't look much at first glance.
"...this book will definitely help you to understand the logic of its strange design. Everything in JavaScript (be it a string, array, number, etc.)..." Read more
"...The Kindle version looks great, everything is readable. The chapters and sections are light and terse, you get a lot of bang for your buck...." Read more
"...The author claims that under the festering pile of chaos there is a beautiful and elegant language: the good parts...." Read more
"...is a short, well-written book that covers its topic, JavaScript, beautifully. Sadly, JavaScript is not a topic worthy of its own book...." Read more
Customers have mixed opinions about the book's value for money. Some find it reasonably priced, while others feel it adds little value and is overpriced for a limited reference.
"...These thirty-six pages more than justify the book's cost. I tend to buy smaller books these days...." Read more
"...; this feels like stuff I'd just google while coding, not terribly valuable to me personally...." Read more
"...I don't regret my purchase as it was not expensive on Kindle, but I think this book needs an update." Read more
"...diagrams to illustrate each syntax, which adds thickness but little value to the book, then repeats them in Appendix D to add another 10 pages of..." Read more
Customers find the content dated and outdated.
"This book is so out of date that you can probably get a better deal on it at a thrift store...." Read more
"...opinions and ego that felt out of place and strict, and is pretty out of date (understandable, but it's too bad it was never updated)...." Read more
"Genuinely getting a bit outdated, but reading it was kind of an effective exercise in an odd way.. I still reread random sections and pick up things..." Read more
"A must read for any JS developer. Even though the code is a bit outdated with the recent EcmaScript updates, the information within is still relevant." Read more
Reviews with images
![Cannot learn JavaScript from this book](https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/transparent-pixel._V192234675_.gif)
Cannot learn JavaScript from this book
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on June 27, 2008Do you struggle when creating objects in Javascript?
Do you find the syntax to be non-intuitive and frustrating?
Do you know the difference between using a function as an object vs using an object literal?
Do you know how using object literals can simplify your code and create something similar to namespaces?
Do you know how to augment the type system -- for example, if wanted all strings to have a trim() method?
Do you know why the "new" statement is so dangerous? Do you know an alternative that eliminates the use of "new" entirely?
These are some of the topics that the book touches upon.
This book is aimed at someone with intermediate programming experience that wants to know the best way to create and use objects, arrays, types, etc. Crockford takes his experience with Javascript to show you best practices coding techniques and styles to use with Javascript. In addition, the book provides insights into what makes Javascript so confusing and what can be done about it.
You might ask "Isn't this stuff already covered in other books that I have?" The answer is no. For one, most other books use a psuedo-classical coding style (see below) to explain objects that is a source of confusion.
Javascript can be very confusing, especially for programmers who have extensive experience in other C-based languages (like myself). Writing good Javascript that uses objects, methods, etc. is hard. In Javascript, if you want to create objects, use inheritance and create methods, you have several different ways to write your code and it's difficult to know what the strengths and weaknesses of each are.
Crockford explains the problem plainly. Other C-based languages use class inheritance (Crockford calls this classical inheritance). Javascript, on the other hand, is the only popular language that uses prototype inheritance, which does not have classes. However, the syntax which Javascript uses to create object is Java-like (Crockford calls this pseudo-classical syntax). It's confusing, because it keeps you in a class-based frame of mind while working in a language that has no concept of classes.
Clarifying what's going on with the object model is the best part of this book. Crockford also explains other parts of Javascript that can be problematic and the techniques that he prefers for handling them. I don't necessarily agree with all of them, but the important thing is that he explains his reasoning.
To effectively learn Javascript, I recommend that you buy 1) a book that covers the details of the language and can be used as a reference (e.g. Javascript, the Definitive Guide) and 2) Crockford's book. Advanced programmers might also enjoy Pro Javascript Design Patterns, which shows a number of ways to combine Javascript with some of the GoF patterns. I would avoid any cookbook style books on Javascript, because you're better off using YUI, JQuery or one of the other Javascript libraries than writing your own drag-and-drops, calendars, etc.
There are a series of Yahoo! videos by Crockford that mirror the material in this book and can be found as podcasts under YUI Theater. They contain nearly all of the material in the book and probably a little more. Those videos are:
- Douglas Crockford/An Inconvenient API: The Theory of the DOM (3 parts)
- Douglas Crockford/The JavaScript Programming Language (4 parts)
- Douglas Crockford/Advanced JavaScript (3 parts)
- Douglas Crockford/Javascript The Good Parts
- Reviewed in the United States on October 2, 2012I just finished this book. It's relatively short but you have to invest a lot of hours to properly absorb it. I think I'm going to need one more pass.
I do not understand the majority of complaints. Some compare Crockford to "the most boring professor you ever had", others said the information was poorly organized and not written very well. Others complained about his ego getting in the way. I, for one, found it to be very interesting and useful. Parts of it were a struggle to get through (and I've been a C coder for 20+ years) but mental challenges are a software engineer's specialty.
In my opinion, none of the complaints are completely true, assuming you are the right audience. This book is NOT for beginners. If you are relatively new to Javascript, it will definitely be useful, but if you are new to programming entirely, this book is not for you. This is a more academic book that gives you a peek behind the scenes to the inner workings of the Javascript language. It is more comparable to K&R's book for C Programmers, but not as complete (just the "good" and "awful" parts!).
It is a book about the Javascript LANGUAGE. It is NOT a book on web programming. It will NOT teach you anything about HTML, or the DOM, or how to put little fiddlly-bits on the screen, or how to work out game physics, or how to use any HTML-specific components. It is a book on the constructs of Javascript, plain and simple. It should NEVER be the only book on Javascript you would own, but if you are serious about Javascript, it should definitely be in your library. I don't think you can be a Javascript master without this book.
My minor grievances are mostly limited to subjective areas where I disagree with him:
1) He states his opinion absolutely, more so in the first part of the book. I prefer a less forceful approach that presents the arguments and lets you decide for yourself. However, I do not feel he went overboard in this regard as some did - I suspect they didn't get very far into the book.
2) While I completely understand the Javascript bugaboo that makes a case for mis-aligned curly braces (K&R style). I cannot get myself to follow this convention (except in a few areas where I make exceptions) To me, code is SO much easier to follow when all blocks are aligned. I will heed his advice and avoid the lurking JS bug, but I will not fully convert to misaligned braces. I resent that his JSLint tool generates hundreds of errors in my code because of this - but fortunately, there's an option to turn it off.
3) When he digs into some of the JS-specific patterns that aren't familiar to non-JS programmers, I wish he would add a disclaimer along the lines of "while this is a powerful tool, understand that depending on such patterns may make the code more difficult to maintain by others less trained in the specifics of Javascript. Or at least comment vigorously." I am a firm believer in "clarity over cleverness" in shared code.
4) In some of the trickier subjects, a few more examples would makes things easier to comprehend. I've never really used Regular Expressions before, and the chapter left my head swimming, and I felt the explanation of the various components of the expressions could have been better.
But these are not major grievances, and I whole-heartily recommend this book for the intermediate Javascript user or the novice JS user who has a solid background in general programming language constructs.
- Reviewed in the United States on April 4, 2014I am a fairly new programmer, so I do not know how my review will really help anyone. However this book took my understanding of Javascript to the next level. I went through the book, some of the content in the book is probably stuff you'll probably not utilize much at all, however it is comforting to have a reference at hand that can give you examples and a brief summation (other than MDN) to help you with your understanding of the book.
This book would pair nicely with Beautiful Code. The author mentions his article in the book, in that article he also looks at JS's good parts but in a simplified way.
The biggest thing to note when going into this book: the author emphasizes the importance of objects in JS, the use of functions and variables to manage objects and efficiently create JS programs. He also gives a section on the terrible parts of JS, just for one to understand and avoid them. All-in-all, it is a compact good book, a bit succinct on the more complex subjects. However go to stackoverflow and search/ask some questions if you are confused.
In my opinion the best chapters:
2-3. Intermingling this with actual coding on your part (utilizing JSbin or JSfiddle, etc) will help you get the most out of understanding some of the behaviors of the language. Pretty much utilizing objects is your best bet for creating efficient and usable JS code. 6 pretty much sums why arrays are inefficient in JS.
4-5, 8. This helps one understand the importance of functions in JS. Also there is a good reference for some of the more used methods that are tied to the prototypes objects.
10. It is short and does not teach you anything about JS, but pretty much sums why adding every single library you can is probably a terrible idea.
Top reviews from other countries
-
Jared Jonathan Ortega PonceReviewed in Mexico on August 21, 2023
5.0 out of 5 stars Super interesante.
Es un libro donde cada capitulo tiene algo que puedes aplicar en tu trabajo de todos los días. Esta lleno de buenos consejos o cosas que muchas veces se pasan por alto. Me encanto.
- George BillsReviewed in Australia on July 4, 2019
3.0 out of 5 stars Good, in depth coverage of Javascript, but looking a bit dated
First of all - this book is not a good introduction to programming in general. Nor would it be a good book for actually getting something useful done in Javascript - for that you should refer to another book on e.g. JS programming for the browser, for Node.js, for React, etc.
What it is good for is as a concise and yet in depth coverage of some of the finer points of Javascript, and as gentle guidance towards the bits that aren't bad (which are helpfully listed in Appendix A: Awful Parts and Appendix B: Bad Parts).
At a decade old it's showing it's age a little bit, and doesn't cover any of the shiny new ES5 / ES6 features. It'd be nice to see coverage of arrow functions in Chapter 4: Functions, especially around the complexities of the "this" keyword. A lot of Chapter 5: Inheritance is dated now that the class keyword syntactic sugar is a thing. Functional programming is covered, but map / reduce / filter aren't, having been standardised the year after JS:TGP was released. Promises are completely uncovered.
As someone coming from an OO background it'd be good to see a brief introduction to idiomatic ways of achieving tasks in JS, e.g. the concept of monkey patching in unit tests.
- JeffReviewed in Canada on April 18, 2016
5.0 out of 5 stars Classic, Invaluable.
I would not forgive myself if I did not write a review for this book. This is one of the best books I have ever read in my entire life. It does not only help me grasp and love Javascript, but also greatly improved my understanding the way of how to do better programming. As a programmer, if you have not read this book, you missed a very good part. So, if you want to learn Javascript, this is definitely the right book to read.
Like the author said, This book is small, but it is dense. It is very hard to understand some pages in the first read. I read every pages at least 3 times, some pages more than 10 times to get the idea fully. But the effort definitely got rewarded.
-
Matteo AmbrosiReviewed in Italy on June 30, 2016
5.0 out of 5 stars Ottimo per principianti ed esperti
Il libro è scritto veramente molto bene, i consigli forniti possono essere molto utili sia per uno sviluppatore principiante che per esperti. L'inglese utilizzato è abbastanza semplice e risulta di facile comprensione anche per chi non conosce la lingua in modo approfondito. Il metodo espositivo è molto concentrato, non ci sono tanti giri di parole o discorsi lunghi per aumentare il numero di pagine del libro, si tratta di un concentrato di informazioni molto utile anche da tenere a fianco del pc nel lavoro di tutti i giorni. Consigliato!
-
Fabiano C. de OliveiraReviewed in Brazil on June 12, 2014
5.0 out of 5 stars O bom do JavaScript
Excelente livro para aqueles que estão iniciando no aprendizado da linguagem (muito embora não seja um tutorial de JavaScript nem um tipo de "usando JavaScript para a Web").
O livro foi direcionado exclusivamente para desmistificar o JavaScript que é considerado, ainda por alguns, uma "linguagem inferior". E isso é feito de forma impecável pelo autor. Ele nos aponta alguns itens que tornaram a linguagem "mal falada". No entanto, exalta a simplicidade e o poder de expressão da linguagem ( a prova disso, nos relata o autor, é que muitas pessoas "programam" em JavaScript sem nunca terem aprendido JavaScript).
O ponto alto do livro, como nos diz o título, está em separar o joio do trigo. É destacado com precisão por que determinadas features da linguagem devem ser evitadas e como estes aspectos ruins da linguagem podem, em um projeto grande, tornar a manutenção do software difícil e sofrível.
Em poucas palavras pode parecer um livro simples mas não é nada fácil alcançar a simplicidade e por isso recomendo o livro mesmo para aqueles que possuem sólidos conhecimentos em JavaScript.
Pode-se dizer que esse livro já faz parte da literatura "oficial" do JavaScript pois é altamente referenciado e citado por vários autores e desenvolvedores JavaScript.