![]() ![]() This book will dig through all aspects of scope-how it works, what it's useful for, gotchas to avoid-and then point toward common scope patterns that guide the structure of programs. The answers to questions like these take the form of well-defined rules called scope. I don't mean how the memory is allocated on the computer, but rather: how does JS know which variables are accessible by any given statement, and how does it handle two variables of the same name? Working with variables is one of the most foundational things we do in programming!īut you may not have considered very closely the underlying mechanisms used by the engine to organize and manage these variables. You Don't Know JS Yet: Scope & Closures - 2nd Edition Chapter 1: What's the Scope?īy the time you've written your first few programs, you're likely getting somewhat comfortable with creating variables and storing values in them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |