Automotive Holiday Deals Books Holiday Gift Guide Shop Men's Athletic Shoes Learn more nav_sap_SWP_6M_fly_beacon Adele egg_2015 All-New Amazon Fire TV Grooming Deals Gifts Under $50 Amazon Gift Card Offer bf15 bf15 bf15 $30 Off Amazon Echo $15 Off All-New Fire Kindle Black Friday Deals Outdoor Deals on Tikes

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your email address or mobile phone number.


Deliver to your Kindle or other device

Flip to back Flip to front
Audible Narration Playing... Paused   You are listening to a sample of the Audible narration for this Kindle book.
Learn more

JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) Kindle Edition

139 customer reviews

See all 2 formats and editions Hide other formats and editions
New from Used from
"Please retry"
Rent from

Length: 1096 pages

Hero Quick Promo
Holiday Deals in Kindle Books
Save up to 85% on more than 1,000 Kindle Books. These deals are valid until November 30, 2015. Learn more

Editorial Reviews

Book Description

Activate Your Web Pages

From the Author

My 10 Favorite Examples from this Book
The 6th edition of JavaScript: The Definitive Guide includes 125 examples that you can view and download from from or from
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 ( 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:

Product Details

  • File Size: 5030 KB
  • Print Length: 1096 pages
  • Simultaneous Device Usage: Unlimited
  • Publisher: O'Reilly Media; 6 edition (April 18, 2011)
  • Publication Date: April 18, 2011
  • Sold by: Amazon Digital Services, Inc.
  • Language: English
  • ASIN: B004XQX4K0
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Lending: Not Enabled
  • Enhanced Typesetting: Not Enabled
  • Amazon Best Sellers Rank: #104,732 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images or tell us about a lower price?

More 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

Most Helpful Customer Reviews

390 of 431 people found the following review helpful By Patrick Goetz on May 6, 2011
Format: Paperback
Readers should note that most of the reviews of this book refer to older editions which are -- due to the rapid evolution of javascript -- completely different books. I've spent a considerable amount of time the last few months reading the 6th edition of this book and have a number of complaints. But first, the kudos: this book is more comprehensive than any other javascript reference.

- the text is frequently non-linear in the sense that author will talk about undefined feature X, stating that feature X will be explained a couple of chapters later. Sometimes this is a good way to gradually introduce concepts, but it's used too much here. Some critics of this book have suggested you need to know javascript before reading this book, this might be why.

- Almost every concept is followed with the caveat "but this feature doesn't work in Internet Explorer prior to version Z. For that you have to use this entirely different function f". This makes the text unnecessarily confusing. How about talking about *standard* ECMAscript and relegating the caveats to end of chapter notes, perhaps adding a superscript to alert the reader about version incompatibilities?

- The examples are poor -- most show how to re-implement javascript 5 functions in javascript 3, or how to get a standard function to work in Internet Explorer 8. Who cares? This is why we have jQuery and Dojo -- in order not to worry about stuff like this. A few examples like this would provide welcome insight into dealing with compatibility issues, but in this case my eyes started to glaze over after a few hundred pages.

Case study: Chapter 17, "Handling Events".
Read more ›
19 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
48 of 49 people found the following review helpful By Charlie on April 25, 2012
Format: Paperback Verified Purchase
I simply wanted to say how much David's book has meant to my learning and understanding of Javascript, and programming in general. I had initially tried learning through many free sources online, and while most were very good in tackling specific issues or illustrating solutions to esoteric problems, none gave me the confidence that I was getting a solid foundation in the language, or programming in general.

In search of something better, I looked to stackoverflow which constantly recommended David's book. To be honest, I pirated it first. But after the first 3 chapters I went straight to Amazon and bought it, as well as Javascript Patters from Stoyan and Douglas's Crockford book Javascript: the good parts (another big hit on the stackoverflow forums). I was dumbfounded at how easy and clear his book made the language. For the first time, ideas were presented in a logical order, with concepts obviously introduced to build on previous ones. Concepts I've been told are essential (hoisting, closures, etc) but were intimidating because I'd never seen them in a cohesive narrative, shocked me in how intuitive they actually were when written well and paired with succinct examples.

I know this all seems overzealous enough to border on the insincere, but for someone who always had a passion for technology and wanted to create his own, but was beginning to be deterred from it all because I thought it was simply above my grasp, I want to say thank you to David and O'Reilly.

They very may well have single-handedly created a new developer, and have dramatically changed my life in the process.

Thanks again.
3 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
59 of 63 people found the following review helpful By James Skemp VINE VOICE on May 23, 2011
Format: Paperback
JavaScript: The Definitive Guide is not just a complete reference of the language, like O'Reilly's other 'thick books,' but also provides a deep dive into JavaScript development. However, if you're just starting out and will be using one of the various libraries (like jQuery), this book may not (yet) be for you.

First, the sixth edition is the first I've read, so I can't speak to any changes. Instead, my review is focused on the book as a first-timer reader to the 'series.'

JavaScript: The Definitive Guide is broken up into four parts; Core JavaScript, Client-Side JavaScript, the Core JavaScript Reference, and the Client-Side Reference. If you've ever picked up one of O'Reilly's other reference books, like Dynamic HTML: The Definitive Reference, you know about what to expect from those last two parts - a deep reference to the language.

The first two parts, however, are a 'deep dive' into the actual language itself. Unlike a mere reference book, JavaScript: The Definitive Guide actually teaches you how to develop in JavaScript, starting at the core fundamentals, and working your way up to more advanced topics.

Part of the 'deep dive' aspect also includes following best practices, making numerous references to Douglas Crockford's JavaScript: The Good Parts throughout the first part of the book, which is about 30% of the book. Alone, the first part of the book provides an excellent, near-complete, tutorial on the language.

Historical information is also included, which I found to be very interesting when it came up, as well as implementation-specific functionality, that has limited use at this time (and as such, I personally found it distracting, and began skimming over later instances, but it's still nice that it's provided).
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews


There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
First post:
Prompts for sign-in