title: Which Logic Operator Takes Precedence
body: <p>So, I'm looking into writing a slightly more complex operation with logic operators in an if-else statement. I know I can do parentheses, and I know it's the better way of doing this, but I've gotten curious and so I'm going to ask. If I were to do something like this:</p>
  
  <pre><code>if (firstRun == true || selectedCategory != undefined &amp;&amp; selectedState != undefined) {
  //Do something
  } else {
  //Do something else
  }
  </code></pre>
  
  <p>How will that be operated without the use of parentheses? I know there is an order of operations for logic operators, similar to PEMDAS, right? I'm curious if it'll be ran something like this:</p>
  
  <pre><code>firstRun == true || (selectedCategory != undefined &amp;&amp; selectedState != undefined)
  </code></pre>
  
  <p>or  maybe if the 'OR' operator takes precedence instead and it ends up going like:</p>
  
  <pre><code>(firstRun == true || selectedCategory != undefined) &amp;&amp; selectedState != undefined
  </code></pre>
  
  <p>The full list would be nice, if you can find it somewhere, of the order of operations for this. Thanks!</p>