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