title: Does Javascript have a contains function?
body: <p>I am not sure if it does or does not. Some sites show using a contains in javascript but when I try it does not work.</p>
  
  <p>I have</p>
  
  <pre><code>var userAgent = navigator.userAgent.split(';');
  
  if (userAgent.contains("msie7") == true) {...}
  </code></pre>
  
  <p>I am trying to use the useragent to figure out if the user is running IE 8 in compatibility mode. So I want to check the userAgenet for msie7 &amp; for the trident 4.0</p>
  
  <p>So how could I check this array?</p>