Kindle Price: $34.99

These promotions will be applied to this item:

Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.

eTextbook features:
  • Highlight, take notes, and search in the book
  • Create digital flashcards instantly
You've subscribed to ! We will preorder your items within 24 hours of when they become available. When new books are released, we'll charge your default payment method for the lowest price available during the pre-order period.
Update your device or payment method, cancel individual pre-orders or your subscription at
Your Memberships & Subscriptions

Buy for others

Give as a gift or purchase for a team or group.
Learn more

Buying and sending eBooks to others

  1. Select quantity
  2. Buy and send eBooks
  3. Recipients can read on any device

These ebooks can only be redeemed by recipients in the US. Redemption links and eBooks cannot be resold.

Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

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.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Secrets of the JavaScript Ninja 2nd Edition, Kindle Edition

4.5 4.5 out of 5 stars 112 ratings

Summary

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

  1. PART 1 - WARMING UP

  2. JavaScript is everywhere
  3. Building the page at runtime
  4. PART 2 - UNDERSTANDING FUNCTIONS

  5. First-class functions for the novice: definitions and arguments
  6. Functions for the journeyman: understanding function invocation
  7. Functions for the master: closures and scopes
  8. Functions for the future: generators and promises
  9. PART 3 - DIGGING INTO OBJECTS AND FORTIFYING YOUR CODE

  10. Object orientation with prototypes
  11. Controlling access to objects
  12. Dealing with collections
  13. Wrangling regular expressions
  14. Code modularization techniques
  15. PART 4 - BROWSER RECONNAISSANCE

  16. Working the DOM
  17. Surviving events
  18. Developing cross-browser strategies
Due to its large file size, this book may take longer to download

Customer reviews

4.5 out of 5 stars
112 global ratings

Top reviews from the United States

Reviewed in the United States on August 15, 2017
I 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.
59 people found this helpful
Report
Reviewed in the United States on November 3, 2022
First 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.
8 people found this helpful
Report
Reviewed in the United States on November 4, 2022
Not 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">
`
One person found this helpful
Report
Reviewed in the United States on May 17, 2017
A 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.
8 people found this helpful
Report
Reviewed in the United States on November 23, 2018
The 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.
8 people found this helpful
Report

Top reviews from other countries

Translate all reviews to English
Phillipe Queiroz
5.0 out of 5 stars Excelente livro
Reviewed in Brazil on May 31, 2022
Livro 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
Karmegam
5.0 out of 5 stars Excellent source to understand JavaScript
Reviewed in India on June 18, 2021
This book is one of the exceptional source to understand JavaScript and it’s eco-system, also it is good to pick as second level book to get the most out of it. Feel brilliant when finishing, and authors are so generous by writing this.
porfidev
5.0 out of 5 stars Para principiantes y avanzados
Reviewed in Mexico on January 17, 2019
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.

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).
Customer image
porfidev
5.0 out of 5 stars Para principiantes y avanzados
Reviewed in Mexico on January 17, 2019
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.

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
Customer image Customer image Customer image
Customer imageCustomer imageCustomer image
Verónica
5.0 out of 5 stars Buena compra
Reviewed in Spain on November 14, 2019
Compre este libro para un regalo. Contenta con la compra.
specificityy
5.0 out of 5 stars One of the best books to turn your JS knowledge from intermediate to ...
Reviewed in the United Kingdom on August 30, 2017
One 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.