let.js (406B)
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 global and block scope let 7 ---*/ 8 let x; 9 let y = 2; 10 11 // Block local 12 { 13 let y; 14 let x = 3; 15 } 16 17 assert.sameValue(x, undefined); 18 assert.sameValue(y, 2); 19 20 if (true) { 21 let y; 22 assert.sameValue(y, undefined); 23 } 24 25 26 reportCompare(0, 0);