Buy New
-56%
$19.63$19.63
FREE delivery Monday, April 27 on orders shipped by Amazon over $35
Advertisement
Advertisement
Ships from: Amazon Sold by: InterTradeCa LLC
Used - Good
$7.11$7.11
FREE delivery April 30 - May 4
Advertisement
Advertisement
Ships from: ThriftBooks-Atlanta Sold by: ThriftBooks-Atlanta
Sorry, there was a problem.
There was an error retrieving your Wish Lists. Please try again.Sorry, there was a problem.
List unavailable.
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 authors
OK
Secrets of the JavaScript Ninja 2nd Edition
Purchase options and add-ons
More than ever, the web is a universal platform for all types of applications, and JavaScript is the language of the web. If you're serious about web development, it's not enough to be a decent JavaScript coder. You need to be ninja-stealthy, efficient, and ready for anything. This book shows you how.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
JavaScript is rapidly becoming a universal language for every type of application, whether on the web, on the desktop, in the cloud, or on mobile devices. When you become a JavaScript pro, you have a powerful skill set that’s usable across all these domains.
About the Book
Secrets of the JavaScript Ninja, Second Edition uses practical examples to clearly illustrate each core concept and technique. This completely revised edition shows you how to master key JavaScript concepts such as functions, closures, objects, prototypes, and promises. It covers APIs such as the DOM, events, and timers. You’ll discover best practice techniques such as testing, and cross-browser development, all taught from the perspective of skilled JavaScript practitioners.
What’s Inside
- Writing more effective code with functions, objects, and closures
- Learning to avoid JavaScript application pitfalls
- Using regular expressions to write succinct text-processing code
- Managing asynchronous code with promises
- Fully revised to cover concepts from ES6 and ES7
About the Reader
You don’t have to be a ninja to read this book—just be willing to become one. Are you ready?
About the Authors
John Resig is an acknowledged JavaScript authority and the creator of the jQuery library. Bear Bibeault is a web developer and author of the first edition, as well as coauthor of Ajax in Practice, Prototype and Scriptaculous in Action, and jQuery in Action from Manning. Josip Maras is a post-doctoral researcher and teacher.
Table of Contents
PART 1 - WARMING UP
- JavaScript is everywhere
- Building the page at runtime
PART 2 - UNDERSTANDING FUNCTIONS
- First-class functions for the novice: definitions and arguments
- Functions for the journeyman: understanding function invocation
- Functions for the master: closures and scopes
- Functions for the future: generators and promises
PART 3 - DIGGING INTO OBJECTS AND FORTIFYING YOUR CODE
- Object orientation with prototypes
- Controlling access to objects
- Dealing with collections
- Wrangling regular expressions
- Code modularization techniques
PART 4 - BROWSER RECONNAISSANCE
- Working the DOM
- Surviving events
- Developing cross-browser strategies
- ISBN-101617292850
- ISBN-13978-1617292859
- Edition2nd
- PublisherManning
- Publication dateSeptember 10, 2016
- LanguageEnglish
- Dimensions7.38 x 1 x 9.25 inches
- Print length464 pages
Frequently bought together

Deals on related products
Customers also bought or read
- JavaScript: The Definitive Guide: Master the World's Most-Used Programming Language
Paperback$53.35$53.35FREE delivery Mon, Apr 27 - Eloquent JavaScript, 3rd Edition: A Modern Introduction to Programming
Paperback$12.97$12.97Delivery Mon, Apr 27 - High Performance Browser Networking: What every web developer should know about networking and web performance
Paperback$39.28$39.28FREE delivery Mon, Apr 27 - Eloquent JavaScript, 4th Edition#1 Best SellerComputer Programming Structured Design
Paperback$23.55$23.55Delivery Mon, Apr 27 - A Smarter Way to Learn JavaScript. The new tech-assisted approach that requires half the effort
Paperback$15.74$15.74FREE delivery Apr 29 - May 5 - Cracking the Coding Interview: 189 Programming Questions and Solutions
Paperback$25.79$25.79Delivery Mon, Apr 27 - Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming#1 Best SellerPython Programming
Paperback$27.53$27.53Delivery Mon, Apr 27 - The Self-Taught Programmer: The Definitive Guide to Programming Professionally
Paperback$20.78$20.78Delivery Tue, Apr 28 - Programming TypeScript: Making Your JavaScript Applications Scale
Paperback$29.43$29.43Delivery Apr 29 - May 1 - The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)#1 Best SellerSoftware Testing
Hardcover$41.64$41.64FREE delivery Mon, Apr 27 - Go Programming Language, The (Addison-Wesley Professional Computing Series)
Paperback$32.30$32.30Delivery Mon, Apr 27 - Web API Cookbook: Level Up Your JavaScript Applications
Paperback$35.49$35.49FREE delivery Mon, Apr 27 - Effective TypeScript: 83 Specific Ways to Improve Your TypeScript
Paperback$41.33$41.33FREE delivery Mon, Apr 27 - Advanced React: Deep dives, investigations, performance patterns and techniques
Paperback$42.00$42.00FREE delivery Tue, Apr 28 - Extreme Programming Explained: Embrace Change, 2nd Edition (The XP Series)
Paperback$43.67$43.67FREE delivery Mon, Apr 27 - Learning JavaScript Design Patterns: A JavaScript and React Developer's Guide
Paperback$38.00$38.00FREE delivery Mon, Apr 27 - Docker: Practical Guide for Developers and DevOps Teams - Unlock the Power of Containerization: Skills for Building, Securing, and Orchestrating with Docker (Rheinwerk Computing)
Paperback$49.95$49.95FREE delivery Mon, Apr 27 - Fluent Python: Clear, Concise, and Effective Programming
Paperback$43.99$43.99FREE delivery Mon, Apr 27 - The Road to React: Your journey to master plain yet pragmatic React.js
Paperback$28.48$28.48Delivery May 5 - 7
From the Publisher
Get Programming with JavaScript
|
Secrets of the JavaScript Ninja 2nd Ed.
|
Functional Programming in JavaScript
|
|
|---|---|---|---|
|
Add to Cart
|
Add to Cart
|
Add to Cart
|
|
| Customer Reviews |
4.2 out of 5 stars 25
|
4.5 out of 5 stars 119
|
4.2 out of 5 stars 43
|
| Price | $24.71$24.71 | $19.63$19.63 | $37.10$37.10 |
| Subtitle: | N/A | N/A | How to improve your JavaScript programs using functional techniques |
| User Experience Level: | Beginner | Intermediate | Advanced |
| For Readers who want to: | Learn how to program without any previous experience, using JavaScript as a first language | Master key JavaScript concepts such as functions, closures, objects, prototypes, and promises and learn best practice techniques such as testing and cross-browser development | Learn through concrete examples and jargon-free explanations how to apply functional programming to real-life development tasks |
| Tools covered: | no data | ES6 (ECMAScript 2015) and ES7 (ECMAScipt 2016) | no data |
Editorial Reviews
About the Author
Bear Bibeault is a web developer and coauthor of Ajax in Practice, Prototype and Scriptaculous in Action, and jQuery in Action from Manning Publications.
Josip Maras is a post-doctoral researcher and teacher whose thesis on automating reuse in web application development included implementing a JavaScript interpreter in JavaScript.
Product details
- Publisher : Manning
- Publication date : September 10, 2016
- Edition : 2nd
- Language : English
- Print length : 464 pages
- ISBN-10 : 1617292850
- ISBN-13 : 978-1617292859
- Item Weight : 1.75 pounds
- Dimensions : 7.38 x 1 x 9.25 inches
- Best Sellers Rank: #808,155 in Books (See Top 100 in Books)
- #113 in JavaScript Programming (Books)
- #178 in Object-Oriented Design
- #779 in Software Development (Books)
- Customer Reviews:
About the authors

Bear Bibeault has been writing software for over four decades, starting with a Tic-Tac-Toe program written on a Control Data Cyber supercomputer via a 100-baud teletype. Because he has two degrees in Electrical Engineering, Bear should be probably designing antennas or something like that, but since his first job with Digital Equipment Corporation, he has always been much more fascinated with programming.
Bear has also served stints with companies such as Dragon Systems, Works.com, Logitech, and even served in the U. S. Military teaching infantry soldiers how to blow things up; the latter teaching him skills crucial for working in Agile software teams.
In addition to his day job, Bear also writes books (who knew?), runs a small business that creates web applications and offers other media services (but not wedding videography, never wedding videography), and helps to moderate CodeRanch.com as a "marshal" (senior moderator).
When not planted in front of a computer, Bear likes to cook big food (which accounts for his jeans size), dabble in photography and video editing, ride his Yamaha V-Star, and wear tropical print shirts.
He works and resides near Austin, TX.

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.
Currently, John is located in Boston, MA. He’s hard at work on his second book, Secrets of the JavaScript Ninja.
Related products with free delivery on eligible orders
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
Generated from the text of customer reviewsSelect to learn more
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on August 15, 2017Format: PaperbackVerified PurchaseI almost didn't read this book because of the name, as my assumption was that it was a beginner level JS book. I'm so glad that I decided to read it. This book is most definitely NOT a beginner book. However, it is written in easy to understand language. It covers all the major topics a good JS developer should understand. Closures, the context of 'this' depending on how a function is invoked, the use of apply(), call(), and bind() to set context, arrow functions and how they affect context, using apply() to supply a variable list of arguments, maps, memoizing functions, object orientation with prototypes, regular expressions, timers and threads, generators and promises, writing modular code, and much more.
I actually own the first edition of this book, and decided to get this edition as well. There is of course some duplication between the two versions. but there is also a huge amount of new material in this edition. It is well worth getting the 2nd edition even if you already own the 1st edition.
The book series You Don't Know JS: Scope & Closures, You Don't Know JS: this & Object Prototypes, and the other 4 volumes are also excellent intermediate level books (one of them is a beginner book), but they are a little more technical and not quite as easy to understand as this book. I don't believe there are any advanced level books. You get to the intermediate level, and then you program for about 10,000 hours to get to the advanced/expert level. On the other hand, Eloquent JavaScript, 2nd Ed.: A Modern Introduction to Programming is a pretty good book that will take you from beginner up to the intermediate level. Lastly, JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) has long been the JS bible for years, but it is now getting a little dated. When a new version ever gets released, I'd buy it immediately. JavaScript: The Good Parts also gets a lot of recommendations, but it too is getting a little dated.
- Reviewed in the United States on November 3, 2022Format: PaperbackVerified PurchaseFirst off, if you are just starting to learn Javascript, this is not the book for you, even if you're an experienced software developer in other languages. You'll be over your head by page 20. Do yourself a favor and start with a more introductory book.
But, if you've been writing Javascript for a couple of years, you're probably ready. I can't tell you how many times I've been stumped by events, promises, classes, ES6, and other topics that I've been able to solve once reading this book. It sometimes gets into the nitty-gritty of why something is happening the way it does, and explains the quirks of Javascript in a relatively clear manner.
Despite this book being written in 2016, it's still very relevant in today's Javascript environment. The authors were tackling information that was cutting-edge and sometimes not even present in browsers back then, so it hasn't aged as badly as other programming books.
- Reviewed in the United States on November 4, 2022Format: PaperbackVerified PurchaseNot quite finished yet - but it has been extremely informative and helpful thus far. I learned javascript on the fly and not as my primary language so this book is filling in a lot of knowledge gaps for me. Someone on here rated the book low because the author didn't understand arrow functions - but the authors do understand arrow functions && go into detail about them w/r/t function context later in the book. Disregard that review.
It isn't a book for absolute beginners & instructions for set-up in the book were non-existent. In order to get the assert function working, clone the book repo add this to your html file in the head (be mindful of the actual directory path):
`
<script src="../Ninja2eCode/assert.js"></script>
<link rel="stylesheet" type="text/css" href="../Ninja2eCode/assert.css">
`
- Reviewed in the United States on November 23, 2018Format: PaperbackVerified PurchaseThe book does an excellent job of explaining the more unique parts of Javascript, without getting bogged down into technical lingo.
The biggest issue I have with the book is that, there are way too many errors that can throw off people who are not coming from a programming background.
For example, Chapter 9 exercise number 3:
What are the contents of the array,
const samurai = [];
samurai.push("Oda");
samurai.unshift("Tomoe");
samurai.splice(1,0, "Hattori, "Takeda");
samurai.pop();
The answer is naturally just ["Hattori, "Takeda"], however when looking at the answer at the back, it still includes "Tomoe" and completely disregards the last .pop().
Most of these errors are small mistakes, however I can see how it can throw off people who are just beginners trying to get a firm grasp on programming in general.
Aside from that, this is a great book and has some really cool examples of how to solve issues that you normally would not find in traditional languages like C++, Java etc.
- Reviewed in the United States on May 17, 2017Format: PaperbackVerified PurchaseA tried a few JavaScript learning sources before this one, and they would show me good ways toward particular ends, but left me wondering why the details were chosen the way they were, and what other possibilities existed. I felt too bogged down by lingering questions to feel confident. After reading this book, I feel as if I actually know the language JavaScript, not merely a way to use the language.
This book is probably not a good first introduction to the language, but it is an excellent way to complete your knowledge. If you want to start from scratch, I would recommend doing any language tutorial online, getting comfortable with that material, and then picking up this book. The book takes a browser-based approach, but the examples written so that they are easy to follow for other environments like the Node console, which is what I am using since I am more interested in Node.js.
Top reviews from other countries
software developerReviewed in Canada on January 11, 20175.0 out of 5 stars The best JS book?
Format: PaperbackVerified PurchaseI've been looking to pick up a great JS book for people who already know how to program, and this one is great.
Just finished 3rd chapter, and so far the book is amazing: explanation on browser and functions is one of the best I have ever seen.
A must have, must read book for anybody serious about learning not just how to wire things together, but really understand JS.
-
Phillipe QueirozReviewed in Brazil on May 31, 20225.0 out of 5 stars Excelente livro
Format: PaperbackVerified PurchaseLivro muito bom que ensina muitos conceitos importantes. Realmente te leva para outro nível de Javascript. Porém não é muito interessante para iniciantes na linguagem
-
VerónicaReviewed in Spain on November 14, 20195.0 out of 5 stars Buena compra
Format: PaperbackVerified PurchaseCompre este libro para un regalo. Contenta con la compra.
specificityyReviewed in the United Kingdom on August 30, 20175.0 out of 5 stars One of the best books to turn your JS knowledge from intermediate to ...
Format: PaperbackVerified PurchaseOne of the best books to turn your JS knowledge from intermediate to advanced, I loved every chapter. Concepts are explained in such a granular way that even if you haven't read about it much before hand, you'll be able to get a grasp of it and follow along.
-
porfidevReviewed in Mexico on January 17, 20195.0 out of 5 stars Para principiantes y avanzados
Format: PaperbackVerified PurchaseCompré este libro y superó mis expectativas totalmente, hay cosas que ya damos por hecho pero en este libro te da una explicación sencilla del porque. Con este libro se entienden desde los conceptos más sencillos aprendiendo su nombre y forma de trabajo, hasta conceptos avanzados como ciclos de vida de los eventos y cómo son lanzados.
Este libro lo debería tener todo fan y desarrollador del lenguaje javascript. Y el precio en amazon es apenas por encima de su precio en USD marcado. Lo busqué en librerías pero era demasiado caro y solo lo manejaban por pedido.
Soy desarrollador web y estoy muy conforme con el contenido del libro. Esta muy bien impreso y las hojas son de buena calidad (es un papel suavecito como sedoso).
Compré este libro y superó mis expectativas totalmente, hay cosas que ya damos por hecho pero en este libro te da una explicación sencilla del porque. Con este libro se entienden desde los conceptos más sencillos aprendiendo su nombre y forma de trabajo, hasta conceptos avanzados como ciclos de vida de los eventos y cómo son lanzados.5.0 out of 5 stars
porfidevPara principiantes y avanzados
Reviewed in Mexico on January 17, 2019
Este libro lo debería tener todo fan y desarrollador del lenguaje javascript. Y el precio en amazon es apenas por encima de su precio en USD marcado. Lo busqué en librerías pero era demasiado caro y solo lo manejaban por pedido.
Soy desarrollador web y estoy muy conforme con el contenido del libro. Esta muy bien impreso y las hojas son de buena calidad (es un papel suavecito como sedoso).
Images in this review


















