You Don't Know JS - Up and Going

An excellent book for those who think they know JavaScript to read so as to find out how much they don't really know.

My Rating: yesyesyesyesno





This is the first book in a series of books that explain some of the parts of JavaScript that many people don't properly understand. This book provides an introduction to JavaScript for those new to the language as well as a brief introduction to the topics that are to be covered in more depth in the later books in the series.

The book starts with a good explanation of variables, operators, functions, comparisons and loops. The coverage of comments gives details not only of their use but also how to use them properly. The section on the difference between === and == lists the circumstances where === must be used and suggests using == everywhere else (I would recommend using === except where you have a specific reason for using == instead as a better alternative).

The book then goes on to cover strict mode and IIFEs (Immediately Invoked Function Expressions) which are key parts of modern JavaScript for keeping scripts separate. The author does insist on naming his IIFE rather than introducing the concept of anonymous functions (something the book doesn't cover, just as it doesn't cover the other ways of defining functions).

The rest of the book gives a brief introduction to other concepts in JavaScript including closures, this, and prototype. These apparently are covered in greater detail in the later books in the series.

The last topics covered are polyfills and transpiling which are the ways to write modern JavaScript that can still run on antiquated browsers that do not support it.

Overall this is an excellent introduction to Modern JavaScript for those who have learnt JavaScript by copying other people's code or who have done a 'history of JavaScript' course. The biggest flaw in the book is the author's lack of knowledge of the difference between an undefined variable and one with a value that is undefined for example [,,,,,] and [undefined,undefined,undefined,undefined,undefined] are two arrays both with length 5 but with only the second of these actually having any entries in the array (those entries all have undefined values but the entries actually exist - which makes a huge difference to what most of the array methods would do with the array).


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow