CDN$ 35.59
  • List Price: CDN$ 55.89
  • You Save: CDN$ 20.30 (36%)
In Stock.
Ships from and sold by Gift-wrap available.
Secrets of the JavaScript... has been added to your Cart
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Secrets of the JavaScript Ninja Paperback – Jan 17 2013

5 out of 5 stars 4 customer reviews

See all formats and editions Hide other formats and editions
Amazon Price
New from Used from
"Please retry"
CDN$ 35.59
CDN$ 29.09 CDN$ 31.95

Save an Additional 10% on Textbooks When you Join Amazon Student

Special Offers and Product Promotions

  • Amazon Student members save an additional 10% on Textbooks with promo code TEXTBOOK10. Enter code TEXTBOOK10 at checkout. Here's how (restrictions apply)

Frequently Bought Together

  • Secrets of the JavaScript Ninja
  • +
  • JavaScript: The Good Parts
  • +
  • JavaScript Patterns
Total price: CDN$ 95.93
Buy the selected items together

No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your e-mail address or mobile phone number.

Product Details

  • Paperback: 392 pages
  • Publisher: Manning Publications; 1 edition (Jan. 17 2013)
  • Language: English
  • ISBN-10: 193398869X
  • ISBN-13: 978-1933988696
  • Product Dimensions: 18.7 x 2.3 x 23.5 cm
  • Shipping Weight: 581 g
  • Average Customer Review: 5.0 out of 5 stars 4 customer reviews
  • Amazon Bestsellers Rank: #19,933 in Books (See Top 100 in Books)
  •  Would you like to update product info, give feedback on images, or tell us about a lower price?

Product Description

About the Author

John Resig is the Dean of Open Source and head of JavaScript development at Khan Academy and the author of the book Pro JavaScript Techniques. He's also the creator and lead developer of the jQuery JavaScript library.

Bear Bibeault has been working in the area of web applications since the mid-nineties, getting started with beta versions of JSP and Servlets. He is a senior moderator at the popular JavaRanch site, and has contributed articles to the JavaRanch Journal as well as Dr Dobb's Journal online. He is a co-author of several Manning books including Ajax in Practice, Prototype and Scriptaculous in Action, jQuery in Action, and jQuery in Action, Second Edition. He works and resides in Austin, Texas.

Inside This Book

(Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

5.0 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 4 customer reviews
Share your thoughts with other customers

Top Customer Reviews

Format: Paperback Verified Purchase
The testing section is a little bit out-dated but the rest translates very well. It's an excellent resource for understanding a language that is challenging at the best of times. It also reads quite well and has thorough and understandable examples.
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
Format: Paperback Verified Purchase
This book was a long time in coming, and totally worth the wait! John really knows his stuff and gives some best practices and sneaky tricks to getting Javascript to do your bidding. If you're a pro JS developer, you should own this book, period.
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
Format: Paperback Verified Purchase
This book was clear, concise and easy to read. This was one of the best technology books I have read and I would fully recommend it to any aspiring Javascript Ninja.
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
Format: Paperback Verified Purchase
Nice book, even for the beginner, who has the basic understanding of programming.
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 Helpful Customer Reviews on (beta) HASH(0xa45fc534) out of 5 stars 85 reviews
59 of 61 people found the following review helpful
HASH(0xa4653d60) out of 5 stars Great book for any js coder Jan. 24 2013
By Smertrios - Published on
Format: Paperback
This book is a must-have for any serious js coder. It's almost guaranteed that you'll learn new tricks from this book. But more importantly your knowledge of the language will dramatically expand.

Bringing in a 'traditional' c/c++ background, js has been a 'pain' for me to deal with. I've been reading a few js books, tons of blogs and tuts, but very few expose the true nature of the language in a simple and pragmatic manner (way too many contrived examples out there, leading to greater confusion.) The kind of knowledge that keeps you from aiming at your foot... This book is it! I've been reading some of the chapters over and over to gain a deeper understanding of js. I then reviewed some of my previous code and realized that... shoot! I was gonna be limping soon.

Packed with information with an easy-read style, this book is already becoming a 'classic' for me. While not for beginners, if you're a programmer and learning js, I'd recommend you go through this book as you go. Most other js books focus on the syntax and usage but not so much on the language intricacies. For one, I tend to learn a language better if I also understand how it works.
53 of 56 people found the following review helpful
HASH(0xa4653db4) out of 5 stars Excellent for becoming a javascript guru Feb. 4 2013
By Gary Bisaga - Published on
Format: Paperback
I know I'm mixing my ethnic metaphors, but this book will help you get to ninjahood, guruhood, or whatever other hood you desire to attain. I am not an inexperienced coder: I have 30 years of experience in coding, including 17 years of java and probably 5 doing semi-serious JavaScript. Still, this book opened my eyes to so many things about JavaScript. For example: I knew about functions and I knew about closures, but the exact relationship between functions, objects, and closures had always eluded me. Knowing what you are doing when you say "new Function()". So many other things.

Face it: most of us look at JavaScript as a toy language. But that is only because most of the scripts we've seen have been toy scripts. We've never really seen the guts of a serious JavaScript library like jQuery, require.js, or impactJS. Once you do, you start seeing constructs you can hardly fathom coming from a background in conventional programming languages like java. JavaScript is a serious programming language, and one that is deceptively similar in syntax to java, even though it could hardly be further in semantics.

Another issue is JavaScript's style of object orientation. JavaScript is object-oriented - perhaps more so than java - but when most of us think "object orientation" we think classes. JavaScript has not class-based, but rather prototype-based object orientation. Unfortunately, there are libraries that make JavaScript look sort-of class-based, but often don't quite get you there. You can (and I have) transport your class-based lines of thought into your JavaScript programming to ill effect. This book helps by really emphasizing the prototypal nature of JavaScript (which is native to the language) rather than classes (which are not).

This book really gives you the ins and outs of JavaScript. Within a few pages I was either learning things I had never known about the language, or realizing how things I had seen actually work. What's more, it presents it in a "unit test" environment. I had always doubted how testable JavaScript was, and I must not be alone, because the book starts out talking about unit tests and presents many of the features using a unit test environment to show how they really work. I consider anything that gets us to write more automated tests - and I am as guilty as any - a good thing.

I highly recommend this book.
69 of 75 people found the following review helpful
HASH(0xa48d43fc) out of 5 stars Something to Recommend Other Than "The Good Parts" Every !@#$ing Time Book Recs are Asked For Feb. 25 2013
By Reppen - Published on
Format: Paperback
Resig's earlier effort "Pro JavaScript Techniques" was a good read for its time but got spread thin by getting engrossed in the details of normalizing the DOM API which is something I already had for as my go-to and that subject is now increasingly less complicated the closer you get to ditching IE8 support.

This is in my experience, the first book to really properly focus on all of the stuff that comes together to really make JavaScript unique and powerful as a language, which has in the past been an understanding you could really only come to by tinkering with JS and reading/borrowing from generous web contributions from Resig, (maybe) Crockford, and IMO, JS-superstar whose name is not sung enough (not for a lack of trying by Resig among others) Dean Edwards whose background in Scheme helped him help the rest of us understand JS for the true complexity-reducing and normalizing beast that it is.

JS didn't come out on top as the only client-side browser option worth pursuing by accident and the view-point that we're "stuck" with it is one that should hopefully be hastily remedied by reading about and understanding what a marvel JS really is when you stop blaming it for Microsoft's tomfoolery and get over the fact that Eich wrote the original version in ten days. That was 17 years ago. JS has evolved constantly since then and hasn't spread to the server, OS, and become the ultimate pan-mobile solution by accident either.

My general sense of the writing is that Resig as always is good at distilling the seemingly complex into bite sized pieces while Bear makes them go down much more easily.

On the "how to use this book" front I'd say keep browsing skimming David Flanagan's "Definitive Guide" to see what all your ingredients are but read this if you're interested in becoming a master chef. If you're intermediate level at JS or heavily experienced in another language to the point where you can compare its mechanics to other languages, this book's probably a good fit.

My only real gripe is (I assume) Resig's with-whiches, from-whiches and in-whiches, which I find semi-painful to read but this is a very minor thing.

Oh and it also took 'em long enough.

31 of 35 people found the following review helpful
HASH(0xa48d47c8) out of 5 stars It has the best explanation of Javscript closures I have read yet! March 25 2013
By S. Tang - Published on
Format: Paperback
I'll revise my review after I read more of this book, but I jumped right to the chapter on closures (Chapter 5.1) after I saw it in the table of contents.

I have never been satisfied with any definition on the internet or in Javascript books I have previously read. You can search for "Javascript closures" on the internet or at Stack Overflow and find (literally) dozens of explanations. I suppose the really smart coders can understand these explanations, but I found all of them to be unsatisfactory. All of them either had either abstract examples or explanations that never quite resonated with my meager mind.

This book nails it with an explanation that is actually straightforward and uses a simple code example (i.e. an outer function, an inner function, and some local and global variables; no arrays, no objects, etc.). The code example uses "hand-drawn" numbered callouts to explain important aspects of the code. I actually find these callouts superior to code comments, since the callout can "point" or "group" lines of code with an explanation and not be restricted by the format of a code comment.

For me, this chapter alone is worth the purchase price. Why? Javascript closures are apparently a popular interview question in some places, so understanding this topic is vital in more ways than one.
15 of 16 people found the following review helpful
HASH(0xa48d48ac) out of 5 stars Good book on Javascript, but not great Sept. 11 2013
By Ulas Tuerkmen - Published on
Format: Paperback
Let me put it as mildly as possible: I don't like Javascript. I think
it's an ugly language with all the wrong choices, and too few
facilities to do decent development. I find it a pity that we're stuck
with it. Despite being a web developer, I have been concentrating on
the backend, and neglected Javascript until now. I picked this book to
remedy this neglect, and to see how the features of the libraries I
used everyday were implemented. Both expectations got satisfied, the
second one in a manner other than I expected.

Secrets of the Javascript Ninja does an extremely good job of teaching
the fundamentals of Javascript the language. It omits the stuff you
would just google, like how to split a string or get a random number,
instead focusing on the fundamental aspects that are different from
other imperative languages. The role of functions and closures are
explained in three detailed chapters. These chapters discuss the many
intricate details of how functions are created and used, and the many
roles they have to take on since Javascript has functions and not much
else. There are also some very interesting coding examples that could
be useful in other languages too, such as a very simple way to
overload a class method in five lines of code.

After the chapters on functions, the object-oriented facilities of
Javascript are discussed. Thanks to this chapter, I at last understand
the role of prototypes in Javascript. There is a pattern in the rest
of the book that starts in the object orientation chapter, though:
Since Javascript does not have most of the facilities that many other
languages (and environments, for that matter) have (such as proper
inheritance), the authors dive into implementing these in
Javascript. These attempts lead to very interesting code listings
which are sometimes really difficult to parse, and sometimes contain,
to put it nicely, surprising snippets of code, such as parsing the
code of a function with regular expressions to see whether it contains
certain references. The following two chapters, one on regular
expressions and the other on timers, contain a lot of very useful
background information, and practical tips and tricks.

The rest of the book, though, is a bit on the difficult-to-read
side. The topics are either not really practical because they concern
deprecated features (the 'with' statement has its own chapter), or
explain in detail how to build a parallel implementation of browser
features. These parallel implementations have one single reason:
IE. Every other section in the second half of Secrets of the
Javascript Ninja starts with "And then there is IE", before explaining
how to build a custom event-handler, CSS selector, or DOM
manipulator. Other browsers also have bugs and errors, but IE appears
to be a prick out of principle, not implementing central APIs, naming
attributes and methods differently, and simply being buggy as
hell. The sections on these parallel implementaions and
bug-circumventions made me happy that I can just drop in jQuery, and
ignore the ugly details.

Despite solid content on the language itself, I think Secrets of the
Javascript Ninja would have been better if the chapters on tricking
out the platform were a bit more limited on detail, and the
programming techniques themselves were given more weight.
Nevertheless, this is a great book for getting to grips with the
language that is, unfortunately, the most widely used of all
programming languages.