title: javascript if condition && condition doesn't work
body: <p>the AND &amp;&amp; operator doesn't work, but when i replace it with an OR || operation it is workin, why? I just used OR || operator for testing, what i need is an &amp;&amp; operator.
  Please help. thanks</p>
  
  <pre><code>function validate() {
      if ((document.form.option.value == 1) &amp;&amp; (document.form.des.value == '')) {
          alert("Please complete the form!");
          return false
      } else return true;
  }
  </code></pre>
  
  <p>i also tried nested if but it doesn't work too</p>
  
  <pre><code>    if(document.form.option.value==1)
      {
           if(document.form.des.value=='')
          {   
              alert ("Please complete the form!");
              return false
  
          }
      }   
  </code></pre>