Goodreads helps you keep track of books you want to read.
Start by marking “You Don't Know JS: this & Object Prototypes” as Want to Read:
You Don't Know JS: this & Object Prototypes
Enlarge cover
Rate this book
Clear rating
Open Preview

You Don't Know JS: this & Object Prototypes

(You Don't Know JS #3)

4.47  ·  Rating details ·  918 ratings  ·  71 reviews
No matter how much experience you have with JavaScript, odds are you don't fully understand the language. This concise, in-depth guide takes you inside JavaScript's this structure and object prototypes. You'll learn how they work and why they're integral to behavior delegation--a design pattern in which objects are linked, rather than cloned.

Like other books in
Paperback, 174 pages
Published July 27th 2014 by O'Reilly Media (first published June 25th 2014)
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about You Don't Know JS, please sign up.

Be the first to ask a question about You Don't Know JS

Community Reviews

Showing 1-30
Average rating 4.47  · 
Rating details
 ·  918 ratings  ·  71 reviews

More filters
Sort order
Ryan Boone
Dec 20, 2015 rated it it was amazing  ·  review of another edition
For experienced and inexperienced alike

This book is a must, whether you are a JS newbie or have been in the programming trenches for years. In it, Kyle Simpson explains the inner workings of two of the most misunderstood and misused features of JS, `this` and Object prototypes.

This `this` portion clearly outlines the criteria and priority JS engines use to determine a particular function's call site or context, which in and of itself is enlightening.

The real value, in
Apr 04, 2018 rated it liked it  ·  review of another edition
I think this is the most verbose book in the series so far, but I get the point that classes are not copies. The author really drives that point home. However, having no experience with classes has a lot of the examples being wasted on me. I wish he went with a newbie approach, but it was good to see what others may be doing!
Dec 12, 2016 rated it it was amazing
Shelves: non-fiction
As in all books in the series, the author gets to the bottom of things, explaining all the nuances and idiosyncrasies of the language. The second part of this book is a bit opinionated, but it does not stand in the way of providing exhaustive information on the subject.
Movsar Bekaev
Apr 16, 2019 rated it it was amazing
Too hard, too much information, totally worth it.
Temur Tchanukvadze
Nov 03, 2018 rated it it was amazing
Shelves: js
I knew JS was mind blowing but after readimg 'this' and prototypes It blew the hell outta me
Alamin Mahamud
Please read carefully. It's a lot to digest, for JS beginners. Prototypal Pattern is discussed here. It's completely another type of pattern, that most of the people are not familiar with.

Kyle Simpson, did a great job!
I think I need to read it one more time, to fully grab the details.
Oct 25, 2017 rated it liked it
The book does teach you this & prototypes in a really good way.

Everything goes well until the 4th quarter of the book, where most of it becomes subjective, especially the Behavioral Delegation chapter. See this Reddit thread to see what i mean.
Mar 24, 2018 rated it it was ok
I have no complaints on the section explaining how "This" works, but the sections covering "Prototypes" and "Object Creation" where more complex than necessary, even the ECMAscript Documentation has easier ways of explaining these concepts without generating much confusion
Kulbhushan Singh
Nov 07, 2015 rated it it was amazing
Perfect in-depth analysis of how 'this' keyword and Object works in JavaScript, must read for high level understanding of Object and context in JavaScript
Dec 02, 2014 rated it really liked it
Shelves: software, javascript
Another solid review of the internals of JS. All devs should probably read this, if only to drive the idea out of their heads that OO and inheritance are somehow intrinsic to software.
Aug 16, 2015 rated it it was amazing
Longer and more challenging than "Scope and Closures" yet more illuminating. Now I know exactly what "object-oriented" is and isn't in JavaScript.
Jun 30, 2015 rated it did not like it
There should be code of conduct for writing technical books. Avoid using "she" when the statement is negative.
Edmond Bitay
Jun 03, 2018 rated it it was amazing
In addition to demystifying the 'this' keyword and the object prototype, the author takes a stance against class oriented design in JS with compelling arguments. If you are a beginner, make sure to always distinguish if you are reading a section which is intended to detail how class oriented design works versus how class oriented design is implemented in JS. One pleasant side effect of having read through the entire expose of the pitfalls of class-oriented design in JS was the arrival to the pro ...more
Mar 05, 2018 rated it it was amazing  ·  review of another edition
Very detailed and insightful. Highly recommended for anyone wanting to know JavaScript well. (If you just want a brief intro, this is likely too detailed.) FOR EXAMPLE: If you want to understand the two ways of using "this" (binding) this will help you understand. Kyle also describes the binding of super in the new definition of JS for even deeper knowledge.. the combination can cause strange behavior if you're not aware of these things). ANOTHER EXAMPLE: is the great descriptions of how prototy ...more
Jun 30, 2018 rated it really liked it
The book provides a full and exhaustive examination of this, object binding, prototype chains, and delegation.
It only focuses on these specific language aspects but is definitely worth reading since it reveals details that might go unnoticed to novice as well as experienced JavaScript developers.

The author also repeatedly stresses how you should avoid trying to force JavaScript to behave like a traditional class-based language and instead embrace and take full advantage of the
Hưng Đặng
Dec 03, 2018 rated it really liked it
Shelves: it-books
For sometimes, I have heard that JS is not designed for OOP and the application of this programming structure is somehow forceful on the language. This book strongly criticize this practice and although the instroduction of ES6 has greatly improved this situation of conflict, it is not enough. The author proposes another alternative which is OLOO.
Right now when I am working, the practice of OOP is everywhere and the book warns that this style of coding would lead to some sophisticated bugs when
Dec 08, 2017 rated it it was amazing  ·  review of another edition
As always, love his book. He has really strong opinions of oop in JavaScript. Initially I was resistant to his opinion, but after digesting for a while, I understand why he said what he said and broadens my mind to other paradigms, namely oloo.

At some parts he may go a little technical but it’s worth it. I can now say I have a much better understanding of this and how prototype chains work in JavaScript.
De Ville Weppenaar
Kyle speaks to me in this instalment of YDKJS. I never felt 100% comfortable using languages that promote OOP design patterns as the only viable option to structure applications. I really love his approach to explaining the pitfalls of this approach in JS, and explaining that it's like "swimming against the current". Rather use the prototype mechanism as it was intended, namely Behaviour Delegation.
Colin Jones
May 31, 2019 rated it really liked it
Great explanations on `this` that may actually stick this time! The end got kind of ranty on how OO was Bad and prototypal model is Good - much of it seemed either misreprenting or just plain wrong. Kind of a big letdown. See for more details.

But still 4 stars for thoroughly covering the language features that I was looking to pick up here.
Dmytro Chasovskyi
May 05, 2017 rated it it was amazing
Shelves: technical
It is a great book in a series. Helps to view on JS from a different angle. I highly recommend this book for all people who tightly coupled with OOP principles. It may change your overall vision dramatically, at least, on JavaScript.
Ryan Day
Jul 12, 2017 rated it it was amazing
I've never read a book about JavaScript like this. Simpson puts aside everything you've learned about JavaScript over the years and digs into the spec to find out how the language really works. You Don't Know JS makes JavaScript feel like a new and exciting language again.
Jan 24, 2018 rated it it was amazing  ·  review of another edition
This book give a real understanding about JS

Choose this book to get a deep knowledge of JS. I suggest the book to any JS dev.

The examples in the book are very clear to undestand
Feb 04, 2019 rated it it was ok
Shelves: webdevelopment
The 'this' discussion was useful but for the most part the rest of the book was a deep dive into HEY JS REALLY ACTUALLY DOESN'T HAVE CLASSES OMGZ
Volodymyr  Balytskyy
May 13, 2018 rated it really liked it
a well documented adventure into the world of prototype concept.
Jul 16, 2018 rated it it was amazing
One of the best coding books I've read - it goes in depth and behind the scenes in JavaScript with plenty of great code examples.
Dec 03, 2017 rated it really liked it
Very exhaustive coverage of Objects and prototypes. However the author sometimes pushes his own points too much on the reader and fails to mention any drawbacks of his proposed approach as in OOLO.
Daniel Spajic
Nov 15, 2017 rated it it was ok
I've found all of the books in this series so far (I haven't read the rest, yet) to be both unnecessarily verbose and academic, with little practical knowledge gained from reading it.
Dec 06, 2018 rated it it was amazing
Foundational, clear and to the point. Exactly the type of writing this industry needs more of.
Laszlo Lazuer
Jul 10, 2019 rated it it was amazing
Great series for interview prep in JavaScript
Feb 05, 2019 rated it really liked it
Great resource as any of the other books in the series.
I wished I hadn't have to go through issues in the github repo to figure out why some code doesn't work.
« previous 1 3 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • Html5: Up and Running: Dive Into the Future of Web Development
  • The Principles of Object-Oriented JavaScript
  • jQuery Cookbook: Solutions & Examples for jQuery Developers
  • Object-Oriented JavaScript
  • Even Faster Web Sites
  • Modern PHP: New Features and Good Practices
  • Professional PHP Programming
  • Mobile Design Pattern Gallery: UI Patterns for Mobile Applications
  • Programming JavaScript Applications: Robust Web Architecture With Node, HTML5, and Modern JS Libraries
  • Learning Javascript Design Patterns
  • Beginning Linux Programming
  • High Performance Browser Networking
  • Elasticsearch: The Definitive Guide: A Distributed Real-Time Search and Analytics Engine
  • JavaScript Web Applications
  • Node.js in Action
  • Secrets of the JavaScript Ninja
  • Designing Web Interfaces: Principles and Patterns for Rich Interactions
  • Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »
Kyle Simpson is an Open Web Evangelist from Austin, TX, who's passionate about all things JavaScript. He's an author, workshop trainer, tech speaker, and OSS contributor/leader.

Other books in the series

You Don't Know JS (6 books)
  • You Don't Know JS: Up & Going
  • You Don't Know JS: Scope and Closures (You Don't Know JS, #2)
  • You Don't Know JS: Types & Grammar
  • You Don't Know JS: Async & Performance
  • You Don't Know JS: ES6 & Beyond
“Any sufficiently advanced technology is indistinguishable from magic. — Arthur C. Clarke” 2 likes
“JS, constructors are just functions that happen to be called with the new operator in front of them. They are not attached to classes, nor are they instantiating a class. They are not even special types of functions. They’re just regular functions that are, in essence, hijacked by the use of new in their invocation.” 0 likes
More quotes…