mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* fix
* fix switch
* Revert "Fix order of `transform-block-scoped-functions` in `preset-env` (#16475)"
This reverts commit 15a3342b39.
* clean
* fix test
* use enter
* fix
39 lines
713 B
JavaScript
39 lines
713 B
JavaScript
function WithoutCurlyBraces() {
|
|
var _this = this;
|
|
if (true) {
|
|
var _loop = function () {
|
|
foo = function () {
|
|
return this;
|
|
};
|
|
bar = function () {
|
|
return foo.call(this);
|
|
};
|
|
console.log(_this, k); // => undefined
|
|
},
|
|
foo,
|
|
bar;
|
|
for (var k in kv) {
|
|
_loop();
|
|
}
|
|
}
|
|
}
|
|
function WithCurlyBraces() {
|
|
var _this2 = this;
|
|
if (true) {
|
|
var _loop2 = function () {
|
|
foo = function () {
|
|
return this;
|
|
};
|
|
bar = function () {
|
|
return foo.call(this);
|
|
};
|
|
console.log(_this2, k); // => 777
|
|
},
|
|
foo,
|
|
bar;
|
|
for (var k in kv) {
|
|
_loop2();
|
|
}
|
|
}
|
|
}
|