js-fundamentals.hashnode.devHoistingVar vs Let vs Const Featurevarletconst ScopeFunctionBlockBlock HoistedYesYes (TDZ)Yes (TDZ) Initialized on hoistYesNoNo Re-declarationYesNoNo Re-assignmentYesYesNo Global objectYesNoNo First, the Mental Model (Critical) Before definitio...Jan 1·3 min read
js-fundamentals.hashnode.devScope in JSScope determines: Where a variable is accessible Where it is visible Where it can be modified In JavaScript, scope is resolved lexically (at write time, not runtime). Types of Scope in JavaScript JavaScript has three main scopes: Scope TypeC...Dec 31, 2025·3 min read