|
|
|
|
|
by erkl
4182 days ago
|
|
This throws an error: typeof x; // throws an error
let x = 1;
This doesn't: typeof x; // returns "undefined"
var x = 1;
While using variables before declaring them is bad practice, I think it's fair to argue that this behaviour is inconsistent. |
|
You're essentially arguing that a feature added because the old behaviour was undesirable is inconsistent because it's not exhibiting the old undesirable behaviour.