title: Using and (&&) and or (||) together in the same condition in JavaScript
body: <p>I'm wondering how to combine and (&amp;&amp;) with or (||) in JavaScript.</p>
  <p>I want to check if either both a and b equal 1 or if both c and d equal 1.</p>
  <p>I've tried this:</p>
  <pre><code>if (a == 1 &amp;&amp; b == 1 || c == 1 &amp;&amp; d == 1)
  {
      //Do something
  }
  </code></pre>
  <p>But it doesn't work.</p>
  <p>How can I write this condition correctly?</p>