tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Set-constructor-1.js (370B)


      1 // The Set constructor creates an empty Set by default.
      2 
      3 load(libdir + "asserts.js");
      4 
      5 var s = new Set();
      6 assertEq(s.size, 0);
      7 s = new Set(undefined);
      8 assertEq(s.size, 0);
      9 s = new Set(null);
     10 assertEq(s.size, 0);
     11 
     12 assertThrowsInstanceOf(() => Set(), TypeError);
     13 assertThrowsInstanceOf(() => Set(undefined), TypeError);
     14 assertThrowsInstanceOf(() => Set(null), TypeError);