tor-browser

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

S12.12_A1_T1.js (607B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    Labelled statements are only used in conjunction with labelled
      7    break and continue statements
      8 es5id: 12.12_A1_T1
      9 description: Checking if labelled break works. See continue and break sections
     10 ---*/
     11 
     12 var object = {p1: 1, p2: 1};
     13 var result = 0;
     14 lbl: for(var i in object){
     15  result += object[i];
     16  break lbl;
     17 }
     18 
     19 if(!(result === 1)){
     20  throw new Test262Error("'break label' should break execution of labelled iteration statement");
     21 }
     22 
     23 reportCompare(0, 0);