Scope in JavaScript: Where Variables Live and How the Engine Finds Them

Every variable you write lives somewhere, and that “somewhere” determines who can see it, who can change it, and when it gets cleaned up