mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* Fix for binding shadowing outer var with loop closure Fix updating of non-captured variable with loop closure * Rename
11 lines
136 B
JavaScript
11 lines
136 B
JavaScript
let res = [];
|
|
|
|
let i = 0;
|
|
for (let i = 1; i < 6; i++) {
|
|
let y = i;
|
|
res.push((() => y)());
|
|
i++;
|
|
}
|
|
|
|
expect(res).toEqual([1, 3, 5]);
|