summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Map-iterator-2.js
blob: 8a648a273a43898079351bdda68a65e7ae1c5c03 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Nested for-of loops can iterate over a Map.

var map = new Map([['a', 0], ['b', 1]]);
var log = '';
for (let [k0, v0] of map) {
    log += k0 + v0 + ':'
    for (let [k1, v1] of map)
        log += k1 + v1;
    log += ';'
};
assertEq(log, 'a0:a0b1;b1:a0b1;');