As mentioned in my previous post, I’m reading JavaScript for the Impatient.
Something I really like about it is that the author, Cay S. Horstmann is opinionated. Technical books need to have a point of view. If you disagree with it, fine. You can take another path but part of the value of reading a technical book is to understand better ways to do it and that is almost always an opinion. Spare me the minutiae and just tell me your opinion on how it should be done.
Right in the preface, the author lists the Five Golden Rules:
- Declare variables with
let
orconst
, notvar
- Use strict mode.
- Know your types and avoid automatic type conversion.
- Understand prototypes, but use modern syntax for classes and methods.
- Don’t use
this
outside constructors or methods.
Noted.