Files
9f70bddc47 fix: for of with iterableIsArray and shadowing variable (#16011)
* fix

* update tests

* review

* fix

* Update packages/babel-plugin-transform-for-of/src/index.ts

Co-authored-by: Nicolò Ribaudo <[email protected]>

* review

* review

---------

Co-authored-by: Nicolò Ribaudo <[email protected]>
2023-12-04 22:03:49 -05:00

11 lines
146 B
JavaScript

function x(e){
const r = [];
for (const s of e) {
const e = s;
r.push(e);
}
return r;
}
expect(x([1, 2, 3])).toEqual([1, 2, 3]);