title: Is it preferred to put statements inside an else statement or use multiple else-if statements?
body: <p>Hopefully a simple question: I was just wondering if there was a convention for putting multiple statements inside an else, or using else-ifs. So, is it generally preferred to use an else statement with statements inside of it, like so:</p>
  
  <pre><code>if(r&gt;0){
  
      return x;
  
  } else {
  
      if(completed==false){
  
          return y;
  
      } else if(started==true){
  
          return z;
  
      } else{
  
          return xx;
      }}
  </code></pre>
  
  <p>or to use else ifs, like so:</p>
  
  <pre><code>if(r&gt;0){
  
      return x;
  
  } else if(completed==false){
  
      return y;
  
  } else if(started==true){
  
          return z;
  
  }else{
  
          return xx;
  
  }
  </code></pre>