Buy new:
$27.90$27.90
$3.99
delivery:
June 16 - 23
Ships from: GreenIceMedia Sold by: GreenIceMedia
Buy used: $12.88
Other Sellers on Amazon
90% positive over lifetime
100% positive over last 12 months

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required. Learn more
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.


JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) 6th Edition
There is a newer edition of this item:
Purchase options and add-ons
Since 1996, JavaScript: The Definitive Guide has been the bible for JavaScript programmers—a programmer's guide and comprehensive reference to the core language and to the client side JavaScript APIs defined by web browsers.
The 6th edition covers HTML5 and ECMAScript 5. Many chapters have been completely rewritten to bring them in line with today's best web development practices. New chapters in this edition document jQuery and server side JavaScript. It's recommended for experienced programmers who want to learn the programming language of the Web, and for current JavaScript programmers who want to master it.
"A must have reference for expert JavaScript programmers...well organized and detailed."
—Brendan Eich, creator of JavaScript, CTO of Mozilla
"I made a career of what I learned from JavaScript: The Definitive Guide.”
—Andrew Hedges, Tapulous
- ISBN-100596805527
- ISBN-13978-0596805524
- Edition6th
- PublisherO'Reilly Media
- Publication dateMay 13, 2011
- LanguageEnglish
- Dimensions7 x 2.4 x 9.19 inches
- Print length1096 pages
Frequently bought together

What do customers buy after viewing this item?
- Most purchased | Lowest Pricein this set of productsHTML and CSS: Design and Build WebsitesPaperback
- Highest ratedin this set of productsJavaScript: The Comprehensive Guide to Learning Professional JavaScript Programming (The Rheinwerk Computing)Paperback
Editorial Reviews
From the Author
The 6th edition of JavaScript: The Definitive Guide includes 125 examples that you can view and download from from examples.oreilly.com/9780596805531/ or from github.com/davidflanagan/javascript6_examples
These are ten of my favorites from the book. Note that many of these use new features of ES5 or of HTML5, and will only work in the newest browsers:
1) Example 1-1 is is an extended example in the first chapter of the book, intended to show readers a simple but non-trivial example of JavaScript. This is the loan calculator example from the last edition, but made much more interesting with the addition of client-side graphics, localStorage, and Ajax.
2) Example 9-7 emulates Java-style enumerated types in JavaScript. It demonstrates that JavaScript's prototype-based inheritance is so flexible that factory methods can be normal object factories or even class factories. That example is a little clearer if you look at the code in Example 9-8.
3) Example 9-16 defines a class hierarchy of abstract and concrete Set classes. This one is a favorite because it involves data types and API design. Chapter 9 includes a number of other Set examples, too.
4) Example 9-23 demonstrates the ES5 Object.defineProperty() method and defines a convenient way to inspect and modify the attributes of the properties of an object. It may not be practical, but I think it is a beautiful hack.
5) Example 15-10 is a simple stream-like API wrapped around the innerHTML property of an element. When you're generating text (a table, for example) for display it is sometimes easier to pass each chunk that you compute to a write() method than it is to concatenate it all together and set it on innerHTML.
6) Example 21-03 is an analog clock implemented as an SVG graphic with scriptable hands. I love client-side graphics, and this is a favorite of mine because making the hands rotate is so simple with SVG transforms.
7) Example 21-06 draws a fractal Koch snowflake using the <canvas> tag. I like it because it draws the same line over and over again, but uses transformations to make the line appear at different locations, orientations and sizes.
8) Example 21-13 is another graphical example: it draws sparklines (edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR). This one is a favorite just because sparklines are so cool.
9) Example 22-1 uses the HTML5 geolocation API to find out where you are then uses the Google Maps API to obtain a static map of your location. I like it because geolocation (via wifi networks) is just pure magic!
10) Example 22-15 is a long example that demonstrates the IndexedDB API. I like it because the idea of a client-side database in a web browser is crazy and cool. This one is really cutting-edge, but if you're running Firefox 4, you can try it out here: davidflanagan.com/demos/zipcodes.html
From the Back Cover
- "A must-have reference for expert JavaScript programmers...well-organized and detailed" -- Brendan Eich, creator of JavaScript, CTO of Mozilla
- "I made a career of what I learned from JavaScript:The Definitive Guide"--Andrew Hedges, Tapulous
- "The Definitive Guide taught me JavaScript"--Tom Robinson, cofounder of 280 North, cocreator of Cappuccino
- "I know which parts of JavaScript matter, based on how crinkled the spine of my copy of The Definitive Guide is in that section"--J. Chris Anderson, cofounder of CoucheBase, Apache CouchDB committer, and author of CouchDB:The Definitive Guide
- "...an indispensable reference for all JavaScript developers. If there's something I need to know about JavaScript, I trust The Definitive Guide will have the right answer for me. It's that good."--Rey Bango, Microsoft Client-Web Community Program Manager and jQuery Team member.
About the Author
David Flanagan is a programmer and writer with a website at http://davidflanagan.com. His other O'Reilly books include JavaScript Pocket Reference, The Ruby Programming Language, and Java in a Nutshell. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and children in the Pacific Northwest between the cities of Seattle, Washington, and Vancouver, British Columbia.
Product details
- Publisher : O'Reilly Media; 6th edition (May 13, 2011)
- Language : English
- Paperback : 1096 pages
- ISBN-10 : 0596805527
- ISBN-13 : 978-0596805524
- Item Weight : 3.85 pounds
- Dimensions : 7 x 2.4 x 9.19 inches
- Best Sellers Rank: #253,287 in Books (See Top 100 in Books)
- #50 in JavaScript Programming (Books)
- #99 in Object-Oriented Design
- #249 in Microsoft Programming (Books)
- Customer Reviews:
About the author

David Flanagan is a computer programmer who has spent much of the last 20 years writing books about programming languages. He now works at Mozilla. David lives with his wife and children in the Pacific Northwest, between the cities of Seattle and Vancouver.
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 Amazon
Reviewed in the United States on May 26, 2020
-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
Much of the book was re-written. There were a few issues that remained a bit elusive after reading the previous version (V5) and V6 cleared them up for me.
After studying chapter 15 on scripting documents, I stopped the press and made a number of important updates to my utilities file - streamlining functions that heavily supported IE 7. I changed a number of my websites to no longer support IE7 - this book gave me the information and courage to do so (the author did not suggest such a move, but it only made sense to me after getting myself up-to-snuff on the modern DOM). My code is now faster and leaner and much much much easier to follow (and debug if ever necessary) by using up-to-date basic dom methodologies such as:
A. Element.prototype to add some important/simple dom navigation methods to all elements (next(), previous() ..)
B. cssClass property to more easily, efficiently, and accurately deal with element classes (whereas I had a lot of code to do these functions and avoid RegExp for efficiency, now my methods simply pass cssClass with a simple RegExp as a fallback for IE8/9 which don't support cssClass. My perspective now is to NOT provide robust fallback for old IE, but only minimal anticipating users will make the jump from IE8 directly to IE 10/11 when their old PCs finally crap out (for those who use IE).
C. use of "data-" element attributes, which allow HTML to validate. I used to wrestle with confusing multiple classes to pass data so my html would validate - or I'd write special server / js scripts to attach data to elements as JS objects after the page loaded.
These examples aren't particularly the new sexy HTML5 initiatives, but without this book it might have taken me years to learn of them and to understand them enough to actually put them into play. And by the way, the book does a good job explaining the many HTML 5 initiatives - but I would first scan the pages to see if they were practical for my use and whether they were widely supported. But it's the small, detailed, practical things used in work-a-day scripting that makes this book so important to me.
I can't say this is a book for beginners only because of its length (1000+ pages) - but after learning JS on my own I wish I had read V5 of this book first as the others I read were all either somewhat outdated or too skimpy in important areas. This is really the only one that I read that goes into detail on the practical application of JS in client side scripting. It's the only JS book I use a reference.
My only criticism is that the book includes an entire chapter on jQuery (65 pages). I don't see the need for re-learning jQuery given browsers are moving along nicely toward standards compliance anyway. But the book would still weigh almost as much without the jQuery chapter.
In my opinion, this book is the same to JavaScript as Bjarne Stroustrup's The C++ Programming Language to C++. The book is divided into 4 parts. First part is dedicated to core JS features. Writing style, depth of explanations, examples, all strongly resemble Stroustrup's book. Flanagan goes into great depth, he explains all problematic parts of JS itself (honestly JS syntax and semantic is sometimes bizarre) and differences between JS implementations. Especially the attention he pays to JS semantic 'quirks' (for instance automatic conversions of numbers, arrays, objects, string) that are so different to C-like languages was very useful for me. Also I like that sample programs didn't bother with any HTML code (the results are just written in comments). It's a great idea not to mix HTML and JS in these early stages of study. Only thing I didn't like was Chapter 6. I think author should have merged this chapter with chapter 9 and he could have presented object-oriented aspects of JS (especially prototype inheritance) together with the presentation of objects.
Second part is all about JS integration with web browsers. Once again author gives in-depth coverage, with many details about differences between browser implementations. Many samples contain utility functions that helps you to overcome these disparities. Chapter 19 contains good intro into jQuery and last chapter covers some new HTML 5 features like client side DB or Web Sockets.
Last two parts (about 300 pages) are JS references covering all important JS functions and classes. To be honest, this part of book was unnecessary for me. If you have Internet, you don't need this printed version of JS reference. It just makes the book thicker and heavier.
To sum up. JS The Definitive Guide is useful book for experienced developers who know some other object oriented language and want to learn JS. It's not the best IT book I have ever read but still it gave me good intro into JS.
Top reviews from other countries

These 3 books never leave my desktop! I have read them all cover to cover, Something I have never done with any other programming books I have ever bought. My bookshelf is littered with Half read, flicked through tomes of regret.
I can honestly say, that getting to understand the worlds most misunderstood programming language has probably been the most enjoyable experience of my programming career!
This tome is a lofty read, weighing in at a 1018 pages, it takes some doing to get through, but I can promise you, if you have been working with Javascript for a while, you are going to experience many epiphanies!
I admit as a cover to cover read, it is hard going, but it was the growing interest and the desire to learn more about the language that kept me going. I definitely feel, that after reading all three books my Javascript skills went through the roof!
The authors, style makes this book very approachable, which is a change from a majority of the programming books out there. Most books are either way too academic or far too dumbed down. I feel the author got it just right!

Yet, it is probably the best book I have found on Javascript in 17 years of using the language on and off. In one place, you would find all essential material not just on JavaScript the language, but also on a lot of the most important associated machinery (XMLHttpRequest, jQuery, HTML 5 APIs etc).
It is probably not the best resource for a JavaScript beginner to learn the language from. For that - as long as you have some programming experience and some knowledge of HTML and the DOM - I believe the single best resource is Douglas Cockford's set of three lectures (often referred to as the Douglas Crockford Trilogy). After that you may want to refer to this book whenever you want to explore some area of JavaScript in detail.


I love JavaScript and wanted to go beyond the basics and really know everything i needed to know, and not just be able to hack stuff. The definitive guide is comprehensive and was the obvious choice. I can say that on reading it (i haven't read it from cover to cover, nor do i think that's how its meant to be studied, unless you are completely new to the language), i was happy with the content and the aha moments. Things i could do in JavaScript but not fully understand why are explained thoroughly. I think every developer serious about learning JavaScript should have this as a reference beside their computer at home :-))
Excellent book, definitely 5 stars without a shadow of a doubt.
