Explain what JavaScript hoists, and why accessing a let/const binding before its declaration behaves differently from var.
Declarations are registered before execution, but initialization rules differ. var is initialized to undefined during environment setup, while let/const remain uninitialized in the Temporal Dead Zone until execution reaches their declaration. Function declarations are hoisted with their body.
A strong JavaScript answer should connect the syntax to the runtime model: scope, references, execution order, coercion, the event loop, or browser behavior. Mention the practical trade-off and one edge case instead of stopping at a definition.
A useful answer structure is: concise definition → how it works → practical example → caveat or trade-off. It stays easy to follow while still sounding senior and precise.
Interviewers use this to test whether you understand execution contexts rather than memorized syntax.