swc/crates/swc_ecma_parser/tests/tsc/ES5for-of32.ts

12 lines
149 B
TypeScript

//@target: ES5
var array = [1,2,3];
var sum = 0;
for (let num of array) {
if (sum === 0) {
array = [4,5,6]
}
sum += num;
}