Hint
var ignores block scope. typeof on a non-existent variable returns "undefined" instead of throwing.
{
var a = 1;
let b = 2;
}
console.log(a);
console.log(typeof b);1 undefined
Explanation: var is function-scoped (or global here) — it escapes the block. let is block-scoped — b is inaccessible. typeof returns "undefined" safely without throwing.
Key Insight: var ignores block scope. typeof on a non-existent variable returns "undefined" instead of throwing.