mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
20 lines
274 B
JavaScript
20 lines
274 B
JavaScript
function Component(props) {
|
|
bar;
|
|
bar = true;
|
|
baz;
|
|
baz = false;
|
|
function foo() {
|
|
bar;
|
|
bar = true;
|
|
if (props) {
|
|
var bar;
|
|
}
|
|
}
|
|
if (props) {
|
|
// nest inside a block statement to test that the declaration hoists
|
|
var bar;
|
|
}
|
|
}
|
|
|
|
var baz;
|