You Don’t Know JS: Scope & Closures
- Length: 98 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2014-03-24
- ISBN-10: 1449335586
- ISBN-13: 9781449335588
- Sales Rank: #97874 (See Top 100 Books)
No matter how much experience you have with JavaScript, odds are you don’t fully understand the language. This concise yet in-depth guide takes you inside scope and closures, two core concepts you need to know to become a more efficient and effective JavaScript programmer. You’ll learn how and why they work, and how an understanding of closures can be a powerful part of your development skillset.
Like other books in the “You Don’t Know JS” series, Scope and Closures dives into trickier parts of the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can achieve true JavaScript mastery.
- Learn about scope, a set of rules to help JavaScript engines locate variables in your code
- Go deeper into nested scope, a series of containers for variables and functions
- Explore function- and block-based scope, “hoisting”, and the patterns and benefits of scope-based hiding
- Discover how to use closures for synchronous and asynchronous tasks, including the creation of JavaScript libraries
Table of Contents
Chapter 1. What Is Scope?
Chapter 2. Lexical Scope
Chapter 3. Function Versus Block Scope
Chapter 4. Hoisting
Chapter 5. Scope Closure
Appendix A. Dynamic Scope
Appendix B. Polyfilling Block Scope
Appendix C. Lexical this
Appendix D. Acknowledgments
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: You Don’t Know JS: Scope & Closures
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.