tor-browser

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

array-holes-2.js (214B)


      1 // for-of consults Object.prototype when it encounters a hole.
      2 
      3 Object.prototype[1] = 'peek';
      4 var log = [];
      5 for (var x of [0, , 2, 3])
      6    log.push(x);
      7 assertEq(log[1], 'peek');
      8 assertEq(log.join(), "0,peek,2,3");