summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Map-constructor-2.js
blob: b80a171d846ae5a7f1dd603a91f0dc3e5ef7f52b (plain)
1
2
3
4
5
6
// The Map constructor can take an argument that is an array of pairs.

var arr = [["zero", 0], ["one", 1], ["two", 2]];
var m = new Map(arr);
for (var [k, v] of arr)
    assertEq(m.get(k), v);