Closed
Description
- Version: v13.14.0
- Platform: Linux 5.3.0-51-generic README: fix prerequisite list formatting #44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
What steps will reproduce the bug?
> let a = a || 2;
Uncaught ReferenceError: Cannot access 'a' before initialization
> typeof a !== 'undefined'
Uncaught ReferenceError: a is not defined
> typeof b !== 'undefined'
false
How often does it reproduce? Is there a required condition?
Every single time. If you use let
to define a variable and in the assignment part you check if the same variable exists, you won't be able to use typeof
after.
What is the expected behavior?
I would expect typeof
should always work regardless of the variable a
existing or not.
What do you see instead?
Uncaught ReferenceError: a is not defined
Additional information
This appear to be an issue in Chromium since it works as expected in Firefox.