tor-browser

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

arguments-unmapped.js (620B)


      1 // Copyright (C) 2014 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 13.6.4
      5 description: Unmapped arguments object traversal using for..of
      6 info: |
      7    "Umapped" arguments objects should be able to be traversed using a
      8    `for..of` loop.
      9 flags: [noStrict]
     10 ---*/
     11 
     12 var i = 0;
     13 
     14 (function() {
     15  'use strict';
     16  for (var value of arguments) {
     17    assert.sameValue(value, arguments[i], 'argument at index ' + i);
     18    i++;
     19  }
     20 }(0, 'a', true, false, null, undefined, NaN));
     21 
     22 assert.sameValue(i, 7, 'Visits all arguments');
     23 
     24 reportCompare(0, 0);