Debian Codegraph @

js/src/tests/test262/language/block-scope/syntax/for-in/mixed-values-in-iteration.js

raw
1 // Copyright (C) 2011 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 13.1
5 description: >
6 Mixed values in iteration
7 ---*/
8 function fn(x) {
9 let a = [];
10 for (let p in x) {
11 a.push(function () { return p; });
12 }
13 let k = 0;
14 for (let q in x) {
15 assert.sameValue(q, a[k]());
16 ++k;
17 }
18 }
19 fn({a : [0], b : 1, c : {v : 1}, get d() {}, set e(x) {}});
20
21
22 reportCompare(0, 0);