Book Review : You don't know JS yet
Though I have read the previous editions of the series. Here is a formal review of the Book You don’t know JS by Kyle Simpson. This review is also present on the book page on Amazon.in
Review text
Just finished reading Getting started from You Don’t know JS 2nd Edition(online). In india US dollars are too expensive.
Just to set the context, I have also read the previous series a few years back and to be true, it helped me understand how everything works deep inside(Or should I say deep-deep inside). That time I just started with front end development and a lot of the things just went over my head. But as suggested you need to read some of the text again once you get hold of JS.
I started my career with Java and got a change to work with JS some time back. I remember when I worked with JS and found myself with so many questions even for a single line of code. You could write JS program in a file, as inline, in script tag, as requirejs modules, as event listener directly onto the element, as ES6 modules, and in dev console directly etc. And to complicate it, all the methods behave differently. Sometimes, the same code worked when written in a file, but sometimes it doesn’t if executed directly in the dev console.
80% of the people with whom I started, felt frustrated and left front-end dev and went back to Java. When you come from an object oriented mindset like Java and told(read lied!) that JS is also same as Java with similar syntax, similar rules and classes with objects; you are tricked. After working for a few weeks you feel betrayed!It took me 2 months to understand how closure works and almost a year to understand why is it even required. In fact when I take interviews today, I ask people why is closure there in JS at the first place instead of asking what is a closure. And it seems almost every junior developer believes that closure is there to create modules with private variables.
Javascript indeed requires a separate getting started book. This book does cover most of the things and sometimes even more than a getting started should.
This book and possibly the rest of the books in the series are NOT for beginners. If you are starting with front-end, especially Javascript, I would suggest you to get some hands on experience and maybe perhaps get interviewed for various JS dev positions. Come back home, try to find out answers to all the weird interview questions. Do some hands on again and then start with this series. You will appreciate the books more.
This book is just a warning to you how much you don’t know. It tells you about How JS started, How it was miss-named, What is the diff between JS and browser apis. alert() is not JS. Its an api. REPL tools behaves differently : Don’t trust console executed scripts What multi-paradigm means? Procedural? Object oriented? Functional? Yes JS can do all or is it? What is Backward compatibilty and why is it required : The root of such a vast eco system of various JS features. Hoisting : Although just a glimpse, but you will find answer to related ques: Is JS compiled or interpreted? Coercion : Another JS concept that adds 10 tricky questions to the interview list Prototypal Inheritance : He mentions that although nobody is writing prototype based classes now a days but still its popular in interviews. That’s because if a person knows about prototype, it gives a hint that he has studied on his own and is quite interested in Javascript internals.
Of course you will find answers to all the questions on the internet but believe me 90% of the time you will only get incorrect examples which do work but are not completely true and will frustrate you more when you encounter other trivial things.
Though at times, the author gives his opinions where he does not agree with the rest of the world but he mentions it clearly that its his perspective and things might not be like this in future. For example I feel that he supports the Object delegation(using Object.create) method of inheritance but its not getting popular and people are more inclined towards class based inheritance(With prototype earlier and now ES6 classes). I myself find classes too much complicated with tens of different ways you can achieve them with JS but you can’t help it. “You either die as a hero or you live long enough to see yourself a villain "
Well I am sure the rest of the books in the series do justify their previous editions and helps us in understanding every bit of JS
Looking forward for them. Although all the text is available online which is like gold for people like us, I would suggest the author to consider the pricing region wise. In india this book costs 57$ paperback and 20$ kindle edition which is way too expensive for professionals who are getting 300$-500$ as monthly income on an average. Yes there are a few who can spend but I am talking about the masses.
End