NOTE: |
---|
Work in progress |
- Foreword
- Preface
- Chapter 1: What's The Scope?
- About This Book
- Compiled vs. Interpreted
- Compiling Code
- Compiler Speak
- Cheating: Run-Time Scope Modifications
- Lexical Scope
- Chapter 2: Illustrating Lexical Scope
- Marbles, and Buckets, and Bubbles... Oh My!
- A Conversation Among Friends
- Nested Scope
- Continue The Conversation
- Chapter 3: The Scope Chain
- "Lookup" Is (Mostly) Conceptual
- Shadowing
- Function Name Scope
- Arrow Functions
- Backing Out
- Chapter 4: Around the Global Scope
- Why Global Scope?
- Where Exactly Is This Global Scope?
- Global This
- Globally Aware
- Chapter 5: The (not so) Secret Lifecycle of Variables
- When Can I Use a Variable?
- Hoisting: Yet Another Metaphor
- Re-declaration?
- Uninitialized Variables (aka, TDZ)
- Finally Initialized
- Chapter 6: Limiting Scope Exposure
- Least Exposure
- Hiding In Plain (Function) Scope
- Scoping With Blocks
- Function Declarations In Blocks
- Blocked Over
- Chapter 7: Using Closures
- Big Picture
- See The Closure
- The Lifecycle of Closures
- Why Closure?
- An Alternate Perspective
- Closer to Closure
- Chapter 8: The Module Pattern
- Encapsulation and POLE
- What is a Module?
- Modern ES Modules
- Appendix A: Exploring Further
- Appendix B: Practice