Overall, the books are amazing and mind opening, and I highly recommend them. It goes through all of the tricks and gotchas of ES6 and as usual Kyle’s way of explanation is very clear and straightforward. I consider this book to be the most important one in the You don’t know JS series, especially for those who have some experience and have been working with Javascript for years. Finally, he gives some overview of assessing performance and benchmarking. He lays down the differences between concurrency, serialism and parallelism and then use those differences to explain the JS Event loop and then goes into the technicalities of implementation using callbacks, promises, and generators. getify/You-Dont-Know-JS Answer questions getify Definitely brendaneich may have more insight, but I believe the reason for JS being prototype based (as opposed to static class inheritance like Java) was in large part to make it a simpler and lighter-weight 'kid brother' to the heavier class-centric Java. Kyle has a unique way of explaining deep technical CS concepts in a simple and straightforward manner. JavaScript Prototype Inheritance Explained pt. Async & PerformanceĪmazing book if you want to understand how asynchronicity in JavaScript works. Considered by GitHub as one of the top open source projects of 2018. We are a small group of friendly humans working on an open source project to make informal video calls more fun and dynamic.
Github you dont know js this prototype code#
However, he lays down some strong arguments against writing JS code in traditional OOP style, which ignore or “hide” the dynamic nature of the language and try to tame it into a static one. Framer apps in whatever editor you want, preview the results in a browser, and make use of all the ES6/7 goodness. The fact that he wants each object to have it’s unique method names and prohibits overriding at all is beyond me, it makes code more complex, less intuitive and also doesn’t make it any easier for new engineers to work with an already existing codebase. may be inherited from the prototype, use for own key, value of object. I have my reservations on the pattern and how readable it’s syntax is. You can use any existing JavaScript library seamlessly from CoffeeScript (and.
An alternative is to use the string replace() function with a regular expression. Kyle in the last chapter proposes his own design pattern OLOO (Objects Linked to Other Objects) which aims to solve many of the issues of trying to code JS in an traditional OO pattern. The trimStart() function is a relatively recent addition to JavaScript, so you need a polyfill if you want to use trimStart() in Internet Explorer or Node.js < 10.0.0. It gives you a general understanding of how objects are created and how behavior is executed or rather “delegated” in JS. The book explains the deep quirks and gotchas of the dynamic nature of JavaScript embodied in the ] concept. > If the return result is Promise originally, it just return the same object, if not, then it will look through the return object until found the. I gave it 5 stars because Kyle’s explanations and examples are amazing even if the material itself is dull. Promise.resolve(foo(x)) > We don’t know whether the return value of foo(x) is a Promise or not, but the Promise.resolve() can help regular the foo(x)’s return value as a standard Promise.
Github you dont know js this prototype series#
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. Kyle Simpson has a unique way in explaining complex CS concepts and ideas in simple words. From syntax gotchas and quirks to how coercion works to asynchronicity (or the illusion of asynchronicity). I think this series is essential for anyone who want to dive deep into Javascript.
It took me almost 4 months to get through the 6 books, and I will definitely go back to reread certain parts of it. Just finished You don’t Know JS series by Kyle Simpson.
return the angle of the vector in radians