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 (383B)


      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 s = '';
     10 for (const x of [1, 2, 3]) {
     11  s += x;
     12 }
     13 assert.sameValue(s, '123', "The value of `s` is `'123'`");
     14 
     15 
     16 
     17 reportCompare(0, 0);