tor-browser

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

head-const-fresh-binding-per-iteration.js (390B)


      1 // Copyright (C) 2011 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.13
      5 description: >
      6    const ForDeclaration: creates a fresh binding per iteration
      7 ---*/
      8 
      9 let z = 1;
     10 let s = 0;
     11 for (const x = 1; z < 2; z++) {
     12  s += x + z;
     13 }
     14 assert.sameValue(s, 2, "The value of `s` is `2`");
     15 
     16 reportCompare(0, 0);