blob: f613719e129fb484b247045e348a10a3114470ab [file] [log] [blame]
function test() {
let scopes = [];
for(let i = 0; i < 2; i++) {
scopes.push(function(){ return i; });
}
let passed = (scopes[0]() === 0 && scopes[1]() === 1);
scopes = [];
for(let i in { a:1, b:1 }) {
scopes.push(function(){ return i; });
}
passed &= (scopes[0]() === "a" && scopes[1]() === "b");
return passed;
}
if (!test())
throw new Error("Test failed");