mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
16 lines
238 B
JavaScript
16 lines
238 B
JavaScript
var heh = [];
|
|
var nums = [1, 2, 3];
|
|
|
|
loop1:
|
|
for (let i in nums) {
|
|
let num = nums[i];
|
|
heh.push(x => x * num);
|
|
if (num >= 2) {
|
|
break loop1;
|
|
}
|
|
}
|
|
|
|
expect(heh).toHaveLength(2);
|
|
expect(heh[0](2)).toBe(2);
|
|
expect(heh[1](4)).toBe(8);
|