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 compact guide explores JavaScript types in greater depth than previous treatments, defining the problems of coercion, demonstrating why types work, and showing developers how to take advantage of those features.
The type system in JavaScript is subject to several misconceptions. Many developers believe that JavaScript has no types, but that's not the case. JavaScript uses a number of types behind the scenes, and has a sophisticated system of implicit and explicit coercion between the various types. This book gives you the complete story.
Like other books in this series, "You Don't Know JS: Types & Grammar" dives into trickier parts of the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can achieve true JavaScript mastery.
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.
Essential reading for anyone working with JavaScript.
Beginners will get a good grounding in the basics of the language types and grammar and it goes into enough detail for experts to learn something too.
I think this is the third or fourth book in the series, but in my opinion, it should be the second. There's nothing in here that you need the second or third books (Scope and Closure, and this & Object Prototypes) to understand.
It's all quite basic, but very important if you want to really understand what's actually happening when your code runs.
Still an important read but less mind-blowing and more frustrating than the other books due to the persnickety nature of coercion in JS. Kyle's ardent defense of the language is no less admirable but slightly more difficult to stomach here!
The first part of this book is about data types and some quirks of the language with data type. Let me give an evil example: `0.1 + 0.2 === 0.3 // false` To be able to understand this peculiarity, we must dig somewhat deeper into floating-point value which IEEE 754 (I can't stand it the first time I heard this name, now I come to term with it) document would mention. Each data types has their own weirdness that I would not spoil it here. One thing I like about the book is its recommendations about best practices. I have hightlighted them all and maybe I will go back to them from time to time. In my opinion, coercion is another big thing in the book. The author argues that there are certain cases that implicit coercion would be useful but I don't think so personally. I value readable code and I don't have that much experience to distinguish the right situations for the tool. "==" is no easy tool and its possiblity to create bugs is terrifying. Despite of the fact that the author encourages not to shun this thing, I think I may subconciously avoid using or use it with great caution. Although the title of the book has "Grammar", I don't think it plays that significant role except its "Function Arguments" chapter which is a good one. One thing that I don't like about this book is the example code is not very close to my day-to-day practice. Perhaps it is a good thing that it makes me even more curious about the last book in the series "ES6 and beyond".
This book is not as interesting or intriguing as other books in the series because it goes through the basic stuff then it's basically a list of Gotchas and quirks in the language logic. I gave it 5 stars because Kyle's explanations and examples are amazing even if the material itself is dull.
All books in this series are essential reads of any Javascript developer. Types are the basic building block of every programming language, so understanding them properly is key. The part of the book I learn the most from was around coercion, how it works and the difference between implicit and explicit conversations. The bok has definitely changed the way I think about some of the 'bad patterns' other books have recommended avoiding completely.
Although the content isn't organized in a strict way. I would also urge people not to follow author's advices always in terms of style (=== vs ==) and make their own opinions. Also the authors sometimes is too defensive about JS.
But definitely recommended. Did I mention it is free?
This is a usefull book which helps you to understand the type system lying in foundation of the language. You will understand what a mess js types are but you'll be able to navigate through that mess easyly. There is a side-effect: you may become resistant to JS type coersion WTF jokes because coresion rules will become straightforward and reasonable for you.
This one was better than last book in series. Kyle added helpful gotchas and how to's code. There was also much clearer why use this feature/why not. This did not feel as polarising as last book. The == vs === guide is especially helpful for someone like me who was told to never use == by so many articles, seniors.
Solid and well rounded introduction of low level JS
Literally JavaScript: The Bad Part. However, it helps you understand how JS works underneath those fancy ES5/6/7 syntax. Recommend for experienced JS developers.
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.
Solid overview on the language semantics and grammar. Sometimes a lot of this goes over my head, but I came out with a lot to think about. Overall a solid read!
A good read on JS to understand each of the primitive types, boxing and unboxing, comparison (== vs. ===), and other got you's of the language. Geared towards an intermediate JS programmer more than anyone else. Good to have read once.
Exceptionally well explained book about the nuances of JS for types and grammar. You can learn here that using implicit coercion is not as bad as you can imagine right now, and remove that lint rule of forcing strict comparison from your project!
This book is very in-depth to the workings of type coercion and the grammar of javascript. However, it does not go too far to the low level implementation of javascript. Just explained the different standards and how they affect the usage of the language.
Como en todos sus libros hay gotchas interesantes y explicaciones detalladas de los mecanismos del lenguaje, pero la actitud del autor me hace querer odiarlo.