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.48  ·  Rating details ·  937 ratings  ·  73 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
...more
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.48  · 
Rating details
 ·  937 ratings  ·  73 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
...more
Mark
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!
Jarek
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.
Movsar Bekaev
Apr 16, 2019 rated it it was amazing  ·  review of another edition
Too hard, too much information, totally worth it.
Temur 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
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.
Bonkerstone
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.
Alexander
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
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
Finlay
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.
Dave
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.
Katherine
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.
Edmond Bitay
Jun 03, 2018 rated it it was amazing  ·  review of another edition
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 ...more
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
...more
Mark
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 ...more
Xanan
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
...more
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
...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.
Victor
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.
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 https://github.com/getify/You-Dont-Kn... for more details.

But still 4 stars for thoroughly covering the language features that I was looking to pick up here.
...more
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.
Brad
Feb 04, 2019 rated it it was ok  ·  review of another edition
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
Martha
Jan 24, 2018 rated it it was amazing
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
Daniel Spajic
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.
Aaron
Jul 16, 2018 rated it it was amazing  ·  review of another edition
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.
Volodymyr  Balytskyy
a well documented adventure into the world of prototype concept.
Prakash
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.
Alex
Dec 06, 2018 rated it it was amazing  ·  review of another edition
Foundational, clear and to the point. Exactly the type of writing this industry needs more of.
« 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
  • Secrets of the JavaScript Ninja
  • JavaScript Patterns
  • JavaScript: The Definitive Guide
  • Clean Code: A Handbook of Agile Software Craftsmanship
  • The C Programming Language
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • The Road to learn React
  • Understanding Ecmascript 6: The Definitive Guide for JavaScript Developers
  • Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People
  • The Principles of Object-Oriented JavaScript
  • Learning React: Functional Web Development with React and Redux
  • HTML and CSS: Design and Build Websites
  • Computer Science Distilled: Learn the Art of Solving Computational Problems
  • A Smarter Way to Learn JavaScript: The new approach that uses technology to cut your effort in half
  • The Pragmatic Programmer: From Journeyman to Master
  • The Clean Coder: A Code of Conduct for Professional Programmers
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »
212 followers
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…