mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
30 lines
396 B
JavaScript
30 lines
396 B
JavaScript
function Component() {
|
|
let a;
|
|
{
|
|
var a; // error, conflicts when hoisted
|
|
}
|
|
|
|
const b = 1;
|
|
{
|
|
var b; // error, conflicts
|
|
}
|
|
|
|
{
|
|
let c;
|
|
var c; // error, conflicts
|
|
}
|
|
|
|
{
|
|
const d = 2;
|
|
var d; // error, conflicts
|
|
}
|
|
|
|
// there should be one instance of `e`:
|
|
var e = 3;
|
|
console.log(e); // 3
|
|
var e = 4;
|
|
console.log(e); // 4
|
|
var e;
|
|
console.log(e); // 4
|
|
}
|