tor-browser

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

proto1.js (372B)


      1 // getprop, proto, 1 shape
      2 
      3 var expected = "11,22,33,11,22,33,11,22,33,11,22,33,11,22,33,";
      4 var actual = '';
      5 
      6 var proto = { a: 11, b: 22, c: 33 };
      7 
      8 function B() {
      9 }
     10 B.prototype = proto;
     11 
     12 function f() {
     13  var o = new B();
     14  
     15  for (var i = 0; i < 5; ++i) {
     16    actual += o.a + ',';
     17    actual += o.b + ',';
     18    actual += o.c + ',';
     19  }
     20 }
     21 
     22 f();
     23 
     24 assertEq(actual, expected);