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 ·  1,089 ratings  ·  80 reviews
No matter how much experience you have with JavaScript, odds are you don't fully understand the language. As part of the "You Don't Know JS" series, this concise yet in-depth guide focuses on the "this" structure in JavaScript, which should be a convenience for developers, but often acts differently than they expect because of how it relates to scope.

You'll also exam JavaS
Kindle Edition, 176 pages
Published July 11th 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

This book is not yet featured on Listopia. Add this book to your favorite list »

Community Reviews

Showing 1-30
Average rating 4.47  · 
Rating details
 ·  1,089 ratings  ·  80 reviews

More filters
Sort order
Start your review of You Don't Know JS: this & Object Prototypes
Ryan Boone
Dec 20, 2015 rated it it was amazing
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 my opinion, comes from the
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  ·  review of another edition
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.
Temo Tchanukvadze
Nov 03, 2018 rated it it was amazing  ·  review of another edition
Shelves: js
I knew JS was mind blowing but after readimg 'this' and prototypes It blew the hell outta me ...more
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.
Sep 21, 2017 rated it it was amazing  ·  review of another edition
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.
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 ...more
Dec 02, 2014 rated it really liked it  ·  review of another edition
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.
Jun 30, 2015 rated it did not like it  ·  review of another edition
There should be code of conduct for writing technical books. Avoid using "she" when the statement is negative. ...more
Aug 16, 2015 rated it it was amazing  ·  review of another edition
Longer and more challenging than "Scope and Closures" yet more illuminating. Now I know exactly what "object-oriented" is and isn't in JavaScript. ...more
Kulbhushan Singh
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 ...more
Darkø Tasevski
Mar 28, 2019 rated it it was amazing  ·  review of another edition
Shelves: development
Must read for all Web developers!
Jon Jones
Oct 21, 2019 rated it it was amazing  ·  review of another edition
All books in this series are essential for any JS developer to read. The book explains how Javascript borrowed concepts from other programming paradigms even though they are different.

The prototype object is created for example, even though it is linked to a 'class' is instantiated, in reality, it is nothing like a how an object-oriented language would define inheritance. Class creation works more like functional chaining.

One of the main takeaways I learnt was that Javascript works in a strange
Mar 05, 2018 rated it it was amazing
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  ·  review of another edition
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 native concepts of
Hưng Đặng
Dec 03, 2018 rated it really liked it  ·  review of another edition
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
Jun 11, 2020 rated it it was amazing  ·  review of another edition
A deep dive into “this” and Objects, along with a different programming style to harness the power of object delegation in JavaScript. And you know what? This is exactly the kind of information I’m looking for, in terms of skill mastery. When I started picking up libraries and refactoring code, it seemed classes were the way to go. In my lack of experience with JS, however, I failed to recognize there are no classes in JavaScript. This book clearly and succinctly breaks it all down and provides ...more
Dec 08, 2017 rated it it was amazing
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
Sep 17, 2018 rated it it was amazing
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. ...more
Austin Lords
Nov 09, 2019 rated it really liked it
Great info! Starting to feel outdated

Most examples are written in pre-ES6 syntax which feels very outdated at this point. I felt like I was learning “extinct” syntax at times, then Kyle would explain “actually its different in ES6 so be aware of that”. ES6 feels like an afterthought, which explains why Kyle is working on version 2.0. Kyle does a good job explaining the nuisances of the language, but this book is starting to age.
This brilliant book clearly and precisely shows what js objects are really are. Before I read it I found it very tricky to argue about inheritance and prototyping in JS. Now the main JS paradigm, which is not classic object-oriented appoarch, is crystal clear for me. So i would definetely advise to read the book for newbies and for experiences professionals who have some doubts about foundation concepts of the language.
Colin Jones
May 31, 2019 rated it really liked it  ·  review of another edition
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.
J Sh
Dec 06, 2020 rated it liked it  ·  review of another edition
books that are written solely by Kyle are very well written. but books that have more contributors just lowered the quality especially "this & object prototype". constantly referring to previous chapters. making very stupid jokes.

you just can feel in the lines that some non-native writers worked on that part. Their more elaboration just made the book a mess
Dmytro Chasovskyi
May 05, 2017 rated it it was amazing  ·  review of another edition
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  ·  review of another edition
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. ...more
Tran Nhat Anh
Nov 27, 2020 rated it really liked it  ·  review of another edition
Kyle Simpson explained this so simple and the difference between "OOP" language and Javascript. You might understand why people said JS doesn't have OOP. Btw, You don't know JS series provides the foundation for your web development career path. I highly recommend it. ...more
Pankaj Phartiyal
A must read for Javascript Developers
Annette Bowman
Jun 10, 2017 rated it really liked it  ·  review of another edition
Good series that picks a narrow slice of Javascript to explain
Nov 15, 2017 rated it it was ok  ·  review of another edition
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. ...more
Dec 03, 2017 rated it really liked it  ·  review of another edition
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.
« previous 1 3 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • JavaScript: The Good Parts
  • Eloquent JavaScript: A Modern Introduction to Programming
  • Clean Code: A Handbook of Agile Software Craftsmanship
  • Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People
  • HTML and CSS: Design and Build Websites
  • JavaScript: The Definitive Guide
  • The Pragmatic Programmer: From Journeyman to Master
  • Code Complete
  • The Mythical Man-Month: Essays on Software Engineering
  • Secrets of the JavaScript Ninja
  • The Principles of Object-Oriented JavaScript
  • Head First Design Patterns
  • Refactoring: Improving the Design of Existing Code
  • Designing Data-Intensive Applications
  • Pro Git
  • Head First Java
  • JavaScript and jQuery: Interactive Front-End Web Development
  • Design Patterns: Elements of Reusable Object-Oriented Software
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. ...more

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

News & Interviews

  If you listen to NPR regularly, you’ve likely heard the voice of Shankar Vedantam, the longtime science correspondent and host of the radio...
10 likes · 2 comments
“Any sufficiently advanced technology is indistinguishable from magic. — Arthur C. Clarke” 3 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…