3 ms·
It seems to me typeof in the described case should return undefined.
by taf2 12y ago
It seems to me typeof in the described case should return undefined.
- ajanuary 12y agotypeof is never being invoked, so it can't return anything. The rules of let are that any reference to the variable before the let declaration (the "temporal dead zone"), it's a reference error. So the reference error is being thrown before typeof is invoked.