tor-browser

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

Array-of-generic-2.js (274B)


      1 // Array.of passes the number of arguments to the constructor it calls.
      2 
      3 var hits = 0;
      4 function Herd(n) {
      5    assertEq(arguments.length, 1);
      6    assertEq(n, 5);
      7    hits++;
      8 }
      9 Herd.of = Array.of;
     10 Herd.of("sheep", "cattle", "elephants", "whales", "seals");
     11 assertEq(hits, 1);