title: Javascript: indexOf
body: <p>I am using the following code to search for a value in a string.</p>
  
  <pre><code>if (myValue.indexOf("Call") &gt; -1) {
   //dosomething
  }
  </code></pre>
  
  <p>How can I do and or?</p>
  
  <pre><code>(myValue.indexOf("Call" || "Data") &gt; -1)
  </code></pre>
  
  <p>The following works;</p>
  
  <pre><code>if (myValue.indexOf("Call") &gt; -1 || (myValue.indexOf("Data") &gt; -1) ) {
       //dosomething
      }
  </code></pre>
  
  <p>But i thought there was an easier way? </p>