title: Javascript - checking if multiple fields are empty not working
body: <p>HTML form look:</p>
  
  <pre><code>&lt;form action="search" id="searchForm" onsubmit="return validateSearch()"&gt;
      &lt;input type="text" name="byTitle" pattern="[a-zA-Z0-9]+" placeholder="Enter a word from title"&gt;
      &lt;input type="text" name="byAuthor" pattern="[a-zA-Z]+\s[a-zA-Z]+" placeholder="First-name Last-name"&gt; &lt;!--  pattern="\w+ \w+" --&gt;
      &lt;input id="startDate" name="startDate" type="date"&gt;
      &lt;input id="endDate" name="endDate" type="date"&gt;
      &lt;input type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Javscript validating function:</p>
  
  <pre><code>function validateSearch() {
  
      var byTitle   = document.getElementById('searchForm').byTitle.value;
      // alert(byTitle);
      var byAuthor  = document.getElementById('searchForm').byAuthor.value;
      // alert(byAuthor);
      var startDate = document.getElementById('searchForm').startDate.value;
      //alert(startDate);
      var endDate   = document.getElementById('searchForm').endDate.value;
      //alert(endDate);       
  
      if(byTitle == byAuthor == startDate == endDate == ""){
          alert("Enter at least one search parameter!");
          return false;
      }
  }
  </code></pre>
  
  <p>Now, if I leave all form fields empty/unfilled and press submit, <code>alert("Enter at least one search parameter!");</code> message should pop-up, but it doesn't. Wanted to see what are the values of each field I have inserted <code>alert</code> after each field reading, and they are all same, empty string/blank. So, why is then that <code>if condition</code> not seeing them as same, empty fields?</p>