You Don’t Know JS: Scope & Closures
Table of Contents
- Foreword
- Preface
- Chapter 1: What is Scope?
- Compiler Theory
- Understanding Scope
- Nested Scope
- Errors
- Chapter 2: Lexical Scope
- Lex-time
- Cheating Lexical
- Chapter 3: Function vs. Block Scope
- Scope From Functions
- Hiding In Plain Scope
- Functions As Scopes
- Blocks As Scopes
- Chapter 4: Hoisting
- Chicken Or The Egg?
- The Compiler Strikes Again
- Functions First
- Chapter 5: Scope Closures
- Enlightenment
- Nitty Gritty
- Now I Can See
- Loops + Closure
- Modules
- Appendix A: Dynamic Scope
- Appendix B: Polyfilling Block Scope
- Appendix C: Lexical-this
- Appendix D: Acknowledgments