Summary of JavaScript Idioms in This Book
Lawrence D. Spencer, Seth H. Richards · 2015
In order to create truly reliable JavaScript applications, one must understand the quirks that make JavaScript what it is: a flexible, powerful, and elegant programming language. JavaScript has only five primitive types: string, number, Boolean, undefined, and null. Everything else, including functions, is an object. This chapter first looks at some of the idiomatic aspects of JavaScript objects. It then reviews two unique, idiomatic aspects of JavaScript variables that must be understood in order to create reliable JavaScript code: hoisting and scoping. Next, the chapter summarizes some of the key features and capabilities of JavaScript functions. Finally, it reviews two important aspects of Boolean functions, type coercion and truthy and falsy values.