tor-browser

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

S12.11_A3_T5.js (577B)


      1 // |reftest| error:SyntaxError
      2 // Copyright 2009 the Sputnik authors.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 info: Syntax constructions of switch statement
      7 es5id: 12.11_A3_T5
      8 description: Introducing statement not followed by "case" keyword
      9 negative:
     10  phase: parse
     11  type: SyntaxError
     12 ---*/
     13 
     14 $DONOTEVALUATE();
     15 
     16 function SwitchTest(value){
     17  var result = 0;
     18 
     19  switch(value) {
     20  	result =2;
     21    case 0:
     22      result += 2;
     23    default:
     24      result += 32;
     25      break;
     26  }
     27 
     28  return result;
     29 }
     30 
     31 var x = SwitchTest(0);