Skip to content

Tag Archives: JavaScript-WeakSet

Below is the example of weakSet.add() method. Example: <script>       function gfg() {       const weakset = new WeakSet();         const object1 = {};      weakset.add(object1);      document.write(weakset.has(object1));       }  … Read More
Below is the example of weakSet.add() method. Example: <script>       function gfg() {       const A = new WeakSet();     const object = {};     A.add(object);     document.write(A.has(object));      }       gfg();  … Read More
Below is the example of weakSet.add() method. Example: <script>       function gfg() {   const A = new WeakSet();  const B = {};  A.delete(B);     document.write(A.has(B) +"<br>"); … Read More
Below is the example of weakSet.add() method. Example: <script>       function gfg() {       var weakSetObject = new WeakSet();     var objectOne = {};        // add(value)     weakSetObject.add(objectOne);… Read More