tor-browser

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

12.6.3_2-3-a-ii-8.js (731B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    Refer 12.6.3; 
      7    The production 
      8    IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement
      9    is evaluated as follows:
     10 es5id: 12.6.3_2-3-a-ii-8
     11 description: >
     12    The for Statement - (normal, V, empty) will be returned when first
     13    Expression is a String object (value is 'undefined')
     14 ---*/
     15 
     16        var accessed = false;
     17        var strObj = new String("undefined");
     18        for (var i = 0; strObj;) {
     19            accessed = true;
     20            break;
     21        }
     22 
     23 assert(accessed, 'accessed !== true');
     24 
     25 reportCompare(0, 0);