tor-browser

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

testMoreClosures.js (270B)


      1 function testMoreClosures() {
      2    var f = {}, max = 3;
      3 
      4    var hello = function(n) {
      5        function howdy() { return n * n }
      6        f.test = howdy;
      7    };
      8 
      9    for (var i = 0; i <= max; i++)
     10        hello(i);
     11 
     12    return f.test();
     13 }
     14 assertEq(testMoreClosures(), 9);