title: Methods of writing if else statement
body: <p>An <code>if-else</code> statement can be written using ternary operator for e.g.</p>
  
  <pre><code>output = (val&gt;val2) ? "Condition is true" : "Condition is false";
  </code></pre>
  
  <p>Now consider </p>
  
  <pre><code>if(condition1){
     //do something
  }else if(condition2){
     //do something 
  }else if(condition3){
    //do something
  }
  </code></pre>
  
  <p>How to write above code using ternary operator ?</p>