1var mySet = new Set();
2mySet.add('foo');
3
4mySet.has('foo'); // returns true
5mySet.has('bar'); // returns false
6
7var set1 = new Set();
8var obj1 = {'key1': 1};
9set1.add(obj1);
10
11set1.has(obj1); // returns true
12set1.has({'key1': 1}); // returns false because they are different object references
13set1.add({'key1': 1}); // now set1 contains 2 entries
14