michael@0: // for-of can be used to iterate over a Set twice. michael@0: michael@0: var set = Set(['a', 'b', 'c']); michael@0: var log = ''; michael@0: michael@0: for (let i = 0; i < 2; i++) { michael@0: for (let x of set) michael@0: log += x; michael@0: log += ';' michael@0: } michael@0: assertEq(log, 'abc;abc;');