NDNisarga Deyinjs-fundamentals.hashnode.dev·Jan 1 · 3 min readHoistingVar 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...00
NDNisarga Deyinjs-fundamentals.hashnode.dev·Dec 31, 2025 · 3 min readScope 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...00