title: Javascript: var1 == true && (var2 = true)
body: <p>I see in the code I am working on often the following code style;</p>
  
  <pre><code>var1 == true &amp;&amp; (var2 = true)
  </code></pre>
  
  <p>After some testing I figured it comes down to:</p>
  
  <pre><code>if (var1 == true) {
    var2 = true;
  }
  </code></pre>
  
  <p>Is this correct, or is there more to it? And why would anyone use this since the readability just dramatically reduces, since your assume at first glance it is just a check on two variables. So you really have to start looking at single or double equal sings and where the parentheses are, which just kinda, you know.. Just curious here..</p>