1 2 3 4 5 6 7 8 9 10
// Clearing a Set after deleting some entries works. var s = new Set(["a", "b", "c", "d"]); for (var v of s) if (v !== "c") s.delete(v); s.clear(); assertEq(s.size, 0); assertEq(s.has("c"), false); assertEq(s.has("d"), false);