title: dynamic if condition comparison of variables in javascript
body: <p>I've 3 variables a,b,c</p>
  
  <p>The initial values of this variables will be 'false'</p>
  
  <p>I want to compare this variables only have that 'true' value.</p>
  
  <p>For example, </p>
  
  <pre><code>a=true,b=false,c=true.
  </code></pre>
  
  <p>So I need to compare like,</p>
  
  <pre><code>if(a &amp;&amp; c)
  
  if, a=true,b=true,c=true,
  
  if(a &amp;&amp; b &amp;&amp; c)
  </code></pre>
  
  <p>How can I generate this if condition dynamically?</p>