tor-browser

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

iteration-statement-do.js (470B)


      1 // Copyright 2019 Google, LLC.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: prod-OptionalExpression
      5 description: >
      6  optional chain in test portion of do while statement
      7 info: |
      8  IterationStatement
      9    do Statement while (OptionalExpression)
     10 features: [optional-chaining]
     11 ---*/
     12 let count = 0;
     13 const obj = {a: true};
     14 do {
     15  count++;
     16  break;
     17 } while (obj?.a);
     18 assert.sameValue(1, count);
     19 
     20 reportCompare(0, 0);