title: Difference between | and || or & and && for comparison
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/684648/a-clear-laymans-explanation-of-the-difference-between-and-in-c">A clear, layman&rsquo;s explanation of the difference between | and || in c# ?</a>  </p>
  </blockquote>
  
  <p>What is the difference between comparing with | and || or &amp; and &amp;&amp; in C# and Javascript?</p>
  
  <p>Examples:</p>
  
  <pre><code>if(test == test1 | test1 == test2) or if(test == test1 || test1 == test2)
  if(test == test1 &amp; test1 == test2) or if(test == test1 &amp;&amp; test1 == test2)
  </code></pre>