title: Combine && and || on javascript
body: <p>I wish to say if URL has 'admin/deals' and 'edit' at the same time in the current url page <strong>OR</strong> if it contains 'deals/new', then DO something.</p>
  
  <pre><code>if (  (window.location.href.indexOf('admin/deals') &gt; -1) 
              &amp;&amp; (window.location.href.indexOf('edit') &gt; -1) ) )
  || if (window.location.href.indexOf('deals/new') &gt; -1){
             alert("your url contains the name franky");
        }
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>SyntaxError: expected expression, got ')'
  </code></pre>