showing results for - "weakset in es6"
Lisa
06 Apr 2017
1/*
2WeakSet() is as same as Set()
3Similarities:
4	1.WeakSet() has all methods that Set() has.
5    2.WeakSet() Donot contain Duplicate Values as Set().
6Differences:
7    3.WeakSet Values are Non Enumerated
8    4.WeakSet Value can only be Empty Objects
9*/
10
11var weak = new WeakSet();
12weak.add({});
13var a={};
14weak.add(a);