title: Javascript OR operator not working in if statement
body: <p>I'm trying to get this Javascript to do something if the day of the week matches any of the days listed in my statement, as well as restricting it to between 17:00 and 19:00 hours, but the OR operator is not working as I expected, I'm new to JS and I'm wondering if I'm misunderstanding the use of this operator. If I were to list a value for just one day of the week, instead of 3 like in my example, the code works as I'd hoped. </p>
  
  <pre><code>var d = new Date();
  var dayOfWeek = d.getDay(); // 0 = Sunday
  var hour = d.getHours();
  
  if ( dayOfWeek == 4 || 5 || 6 &amp;&amp; hour &gt;= 17 &amp;&amp; hour &lt; 19 ){
      // do stuff
    } else {
      // do other stuff 
  } 
  </code></pre>