Use an array to query whether one of the strings exists in window.location.href
<p>I currently search the window.location.href individually:</p>

<p>window.location.href: <code>http://www.example.com/6CATA/folder/file.html</code></p>

<pre><code>var searchWinHref = window.location.href;
if(searchWinHref.indexOf("/6CATA/") &gt; -1) {
  alert('6CATA is in the window.location.href');
}
</code></pre>

<p>Which triggers the alert.</p>

<p>How can I adapt this to query the variable searchWinHref to match one of the strings in an array?</p>

<pre><code>var searchWinHref = window.location.href;
var searchWinArray = ['6CATA', '6CATB', '6CATC'];
if(searchWinHref.indexOf(searchWinArray)) {
  alert('alert which code is in the window.location.href');
}
</code></pre>
