4 ms·
It doesn't in v8 -- what do you mean by `should`?
by nullz 11y ago
It doesn't in v8 -- what do you mean by `should`?
- egeozcan 11y agoIt's an implementation error. In Firefox, it correctly throws: > ReferenceError: can't access lexical declaration `a' before initialization
- titzer 11y agoNo, legacy const is not spec'd by ES5. It behaves differently in FireFox and V8 because it was added at different times with different semantics in the live range hole case. In strict mode, it will throw on V8 as well.