mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Test that continue inside a for-of loop body properly restores the lexical environment when the for-of creates a per-iteration scope for the loop variable.
14 lines
216 B
JavaScript
14 lines
216 B
JavaScript
function f(e) {
|
|
const t = [];
|
|
for (const r of e) {
|
|
if (!r) {
|
|
t.push(r);
|
|
continue;
|
|
}
|
|
const o = t.find(i => r.x === i.x);
|
|
o;
|
|
}
|
|
return t;
|
|
}
|
|
f([]);
|