summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/let/syntax/let.js
blob: cf9bd1b53c8ce3968453e54936e262f8baaad831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (C) 2011 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 13.1
description: >
    global and block scope let
---*/
let x;
let y = 2;

// Block local
{
  let y;
  let x = 3;
}

assert.sameValue(x, undefined);
assert.sameValue(y, 2);

if (true) {
  let y;
  assert.sameValue(y, undefined);
}


reportCompare(0, 0);