title: Best Way for Conditional Variable Assignment
body: <p>Which is the better way for conditional variable assignment?</p>
  
  <p>1st method</p>
  
  <pre><code> if (true) {
     var myVariable = 'True';
   } else {
     var myVariable = 'False';
   }
  </code></pre>
  
  <p>2nd Method</p>
  
  <pre><code> var myVariable = 'False';
   if (true) {
     myVariable = 'True';
   }
  </code></pre>
  
  <p>I actually prefer 2nd one without any specific technical reason. What do you guys think?</p>