More on this book
Community
Kindle Notes & Highlights
Unlike many other languages, blocks in JavaScript do not create a new scope, so variables should be defined at the top of the function, not in blocks.
The function object created by a function literal contains a link to that outer context. This is called closure. This is the source of enormous expressive power.
There are four patterns of invocation in JavaScript: the method invocation pattern, the function invocation pattern, the constructor invocation pattern, and the apply invocation pattern. The patterns differ in how the bonus parameter this is initialized.
Avoid creating functions within a loop. It can be wasteful computationally,and it can cause confusion,

