OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Flags: --harmony-scoping | |
6 | |
7 "use strict"; | |
8 | |
9 var count = 0; | |
10 for (let x = 0; x < 10;) { | |
11 x++; | |
12 count++; | |
13 continue; | |
14 } | |
15 assertEquals(10, count); | |
16 | |
17 count = 0; | |
18 label: for (let x = 0; x < 10;) { | |
rossberg
2014/11/14 10:58:01
Can we add additional tests with nested for-let lo
adamk
2014/11/14 19:03:36
Added a variety of tests, and commented each one.
| |
19 while (true) { | |
20 x++; | |
21 count++; | |
22 continue label; | |
23 } | |
24 } | |
25 assertEquals(10, count); | |
26 | |
27 count = 0; | |
28 for (let x = 0; x < 10;) { | |
29 x++; | |
30 count++; | |
31 { | |
32 let x = "hello"; | |
33 continue; | |
34 } | |
35 } | |
36 assertEquals(10, count); | |
OLD | NEW |