tor-browser

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

hoisting-var-declarations-out-of-blocks.js (362B)


      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    hoisting var declarations out of blocks
      7 ---*/
      8 function fn() {
      9  {
     10    var x = 1;
     11    var y;
     12  }
     13  assert.sameValue(x, 1);
     14  assert.sameValue(y, undefined);
     15 }
     16 fn();
     17 
     18 
     19 reportCompare(0, 0);