tor-browser

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

lookup-in-and-through-block-contexts.js (551B)


      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.1
      5 description: >
      6    lookup in and through block contexts
      7 ---*/
      8 function fn(one) {
      9  var x = one + 1;
     10  let y = one + 2;
     11  const u = one + 4;
     12  {
     13    let z = one + 3;
     14    const v = one + 5;
     15    assert.sameValue(one, 1);
     16    assert.sameValue(x, 2);
     17    assert.sameValue(y, 3);
     18    assert.sameValue(z, 4);
     19    assert.sameValue(u, 5);
     20    assert.sameValue(v, 6);
     21  }
     22 }
     23 
     24 fn(1);
     25 
     26 
     27 reportCompare(0, 0);