blob: 3ac84250765c17839812c1e11c49ebd810d9724b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Set iterators produces entries in the order they were inserted.
var set = new Set();
var i;
for (i = 7; i !== 1; i = i * 7 % 1117)
set.add(i);
assertEq(set.size, 557);
i = 7;
for (var v of set) {
assertEq(v, i);
i = i * 7 % 1117;
}
assertEq(i, 1);
|