title: Nested switch statement in javascript
body: <p>Is it possible to use nested <code>switch</code> statement in javascript.</p>
  
  <p>My code is some what look like </p>
  
  <pre><code>switch(id1)
  {
  case 1:
       switch(id2){
       case 1:{
          switch(id3){
          case 1:{}
          case 2:{}
          }
      }
       case 2:{
          switch(id4){
          case 1:{}
          case 2:{}
          }
       }
  }
  case 2:
  }
  </code></pre>
  
  <p>If yes then it is a good practice to do or we can use any alternate approach.</p>